View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Variable for column selection

Dim iCol As Long


Cells(Rows.Count, iCol).End(xlUp).Offset(1).Select

--
HTH

Bob Phillips

"Mats W." wrote in message
...
Hi,

I use the script;
Range("D" & Rows.Count).End(xlUp).Offset(1).Select
..to check for the last row in a given column.

but I need to change the column D to a variable. I tried different ways to
write that without success. Appreciate if someone can give a hint!

Thanks!
--
Mats W.