View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
newguy newguy is offline
external usenet poster
 
Posts: 40
Default Referencing a Column with a Variable name

I have a variable (Columnname) that finds a column where a Cell in a
row equals a value on another page.(A user inserts a date on the first
page and it matches a value in a row on another page and this variable
is set to that column) The problem I am having now is using it to set
other cells.

Normally to set a cell on this page I would use
worksheetname.Range("B4").Value = something

But since the column is not going to be equal to "B" every time I need
to be able to call that variable Columnname so something like
worksheetname.Range.("Columnname" + 3).value = somthing