ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cell value syntax (https://www.excelbanter.com/excel-programming/415568-cell-value-syntax.html)

miek

cell value syntax
 
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)")


Jim Thomlinson

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)")


miek

cell value syntax
 
S-in is a var
Thanks for your help, that did the trick

"Jim Thomlinson" wrote:

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)")



All times are GMT +1. The time now is 05:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com