View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default cell value syntax

l_ans = ActiveSheet.Evaluate(" COUNTIF(" & Col_value & "1:" & Col_value &
l_lastrow & ", S_in)")

Not sure what S_in is but I am assuming a named range.
--
HTH...

Jim Thomlinson


"miek" wrote:

Im getting a type mismatch on the "evaluate" line code. can someone
help?

dim Col_value as string
dim l_lastrow as long

l_lastrow = 50
Col_value = "B"
b1:b50

Col_value 1: Col_value l_lastrow
l_ans = ActiveSheet.Evaluate(" COUNTIF(Col_value & 1: & Col_value &
l_lastrow, S_in)")