Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can anyone help explain this situation;
When I try this statement: Range("a21").end(xlDown).offset(1,0).value = x the cursor does NOT find the end of the list in column "A" to place the value in the proper cell. When I try this statement Range("a21").end(xlUp).offset(1,0).value = x the cursor DOES find the end of the list in column "A"to place the value in the proper cell. This puzzles me to not end. Thanks for any enlightenment JDB |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
JDB wrote :
Can anyone help explain this situation; When I try this statement: Range("a21").end(xlDown).offset(1,0).value = x the cursor does NOT find the end of the list in column "A" to place the value in the proper cell. When I try this statement Range("a21").end(xlUp).offset(1,0).value = x the cursor DOES find the end of the list in column "A"to place the value in the proper cell. This puzzles me to not end. Thanks for any enlightenment JDB Using End basically does the same thing as using the Ctrl and Down [or Right] arrow keys. So.., if there's any blank cells between 'A1" and "A21" then using End(xlDown) sets the cell ref one row above the blank cell. The correct way to find the last row in a column is to start at the bottom (ie: Cells(ActiveSheet.Rows.Count, 1).End(xlUP), which in your case might be "A21". Otherwise, you could get the next row by simply using Range("A21").Offset(1) to ref cell "A22". -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Destination:=.Cells(.Rows.Count, "A").End(xlUp).Row + 1 | Excel Programming | |||
Whats wrong with this? MyWBAccRep.Sheets("Volumes").Cells.Find("latest").Copy.Offset(0, | Excel Programming | |||
Cells(Rows.Count, "b").End(xlUp).Row | Excel Programming | |||
inalRow = Range("A65536").End(xlUp).Row | Excel Programming | |||
S1.Range("D65536").End(xlUp).Select | Excel Programming |