return the value of the active column

  • Thread starter Thread starter Kelvin
  • Start date Start date
K

Kelvin

Any Ideas???

How would you capture the value the active column in a variable?

=column() will give the value of the active column

How would I use a variable to capture that value. val = column() ????

I would appreciate any help

Thanks
 
We are talking about in a macro, right? If I understand your question
correctly...

Val = ActiveCell.Column

Rick
 
Thanks , that seems to work , I am getting the value in the variable.

I am now getting an error in my vlookup when I use val instead of 33?
Any ideas?

Thanks again
 
Sorry, I followed your lead and used the variable name you proposed in your
posting without paying attention to it. Val is a reserved key word in VBA
(there is a function by that name), so you can't use it as a variable name.
Just pick a different name and you should be okay.

Rick
 
Back
Top