Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With data in cells A1:A12, in the immediate window, I get:
? Range("A65536").End(xlUp).Row 12 ? Cells(Rows.Count,"a").end(xlup).row 12 ? Range("A" & Rows.Count).End(xlUp).Row 12 ? Range("A:A").End(xlUp).Row 1 Why (in the last case) am I getting 1 ? Thanks (in advance), |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you select column A and do End, then Up Arrow, I get A1.
-- Regards, Tom Ogilvy wrote in message ... With data in cells A1:A12, in the immediate window, I get: ? Range("A65536").End(xlUp).Row 12 ? Cells(Rows.Count,"a").end(xlup).row 12 ? Range("A" & Rows.Count).End(xlUp).Row 12 ? Range("A:A").End(xlUp).Row 1 Why (in the last case) am I getting 1 ? Thanks (in advance), |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The .End(xlUp) starts "searching" from the uppermost cell of the range object
specified. The range object A:A includes A1 so .End(xlUp) starts with A1 and goes up from there. Hence it returns row=1 " wrote: With data in cells A1:A12, in the immediate window, I get: ? Range("A65536").End(xlUp).Row 12 ? Cells(Rows.Count,"a").end(xlup).row 12 ? Range("A" & Rows.Count).End(xlUp).Row 12 ? Range("A:A").End(xlUp).Row 1 Why (in the last case) am I getting 1 ? Thanks (in advance), |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
option buttons run Click code when value is changed via VBA code | Excel Programming | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |