On my worksheet the following two formulas work and correctly return 5 as the result.
=COLUMN(data_rng[[#Headers],[Net]])
=COLUMN($E$1)
However, trying to use those formulas in Evaluate, they do not work.
Dim c As Variant
c = Evaluate("=COLUMN(data_rng[[#Headers],[Net]])")
c = Evaluate("=column($E$1)")
I have tried Dim c as integer as well.
With c as Variant, the line c=Evaluate... executes, does not give an error, but after the line, c does not have the value 5.
If i type ?c in the Immediate window, after the above line executers, it gives the "Runtime Error 13, Type mismatch".
With c Dim as Integer, the error occurs on the Evaluate line and it does not execute.
How do i get this to work, use the COLUMN() worksheet function within VBA to get the result?
Thanks!
=COLUMN(data_rng[[#Headers],[Net]])
=COLUMN($E$1)
However, trying to use those formulas in Evaluate, they do not work.
Dim c As Variant
c = Evaluate("=COLUMN(data_rng[[#Headers],[Net]])")
c = Evaluate("=column($E$1)")
I have tried Dim c as integer as well.
With c as Variant, the line c=Evaluate... executes, does not give an error, but after the line, c does not have the value 5.
If i type ?c in the Immediate window, after the above line executers, it gives the "Runtime Error 13, Type mismatch".
With c Dim as Integer, the error occurs on the Evaluate line and it does not execute.
How do i get this to work, use the COLUMN() worksheet function within VBA to get the result?
Thanks!