Hello,
I am trying to write a macro that returns the data contents of the last cell in a row of data. I then need to declare the cell's data as a variable.
So far, my code is this (from another online tutorial):
Public Sub LastColumnInOneRow()
'Find the last used column in Row1: row 1 in this example
Dim LastCol1 As Double
With ActiveSheet
LastCol1 = Range("IV3").End(xlToLeft).Column
End With
MsgBox LastCol1
End Sub
I only seem to be about to get hte program to return a count of the cols for me, not the actual cell data. Please help.
Thanks,
R
Configuration: Windows XP Internet Explorer 7.0