0

I am trying to count the cells in range where the length of the cell is less than 2.

Regular formula "sumproduct(n(len(A2:D10)<2))" works as expected. while trying to incorporate this in my code

if [sumproduct(n(len(A2:D10)<2))] <> 0 then 
else
end if

it works, but the problem is that range is not fixed so whenever i try to assign a variable and run it is not working shows Error 2029


if [sumproduct(n(len("A2:D" & lrow)<2))] <> 0 then 
else
end if

anyway to get around this issue.

Thanks.

GSD
  • 1,252
  • 1
  • 10
  • 12
Prince
  • 35
  • 4

1 Answers1

0

Thanks Scott -

I thought Activesheet was not needed so i used []

ActiveSheet.Evaluate("sumproduct(n(len(A2:D" & Lrow & ")<2))")

Now i have modified this as per my requirement I was able to overcome my problem.

Thanks a lot.

Prince
  • 35
  • 4