Thanks for your time and knowledge!
Dennis
"Gord Dibben" wrote:
Dennis
End(xlUp) starts looking at row 65536 and moves up until it finds data.
The .Offset(1,1) goes back down one row and over one column.
..Offset(1,0) would select last empty cell in column A
Sub Test()
With Sheets("Sheet2")
.Cells(Rows.Count, 1).End(xlUp).Offset(1, 1).Value = "Test"
End With
End Sub
Places the word test into column B in last empty row of Column A
Gord Dibben Excel MVP
On Thu, 25 Nov 2004 16:05:01 -0800, Dennis
wrote:
Using XL 2003 & 97
Apparently, I just do not get it.
I wish to enter "Test" into the first empty cell in Column A.
Tried .Value and .FormulaR1C1 to no avail.
The code does not bomb but "Test" does not show up anywhere on
Worksheet("Sheet2").
Is xlUp(1, 1) kind-of like Offset(1, 1)?
Sub Test()
With Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp)(1, 1).Value = "Test"
End With
End Sub
TIA Dennis
|