Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question about "End(xlUp)" property
I think I'd do something like:
dim NextRow as long nextrow = range("a65536").end(xlup).row if isempty(range("A" & nextrow)) then 'do nothing else nextrow = nextrow + 1 end if Terence wrote: Hi, I am writing some codes to find out the last non-empty cell in column A of my worksheet by using the code "Range ("A65536").End(xlUp).Row", then I can write something new at the next row. However, if the cell (A1) at row 1 is empty, it doesn't return 0 but 1. If I write something at the next row, then it is written to row 2 (cell A2) but leaving cell A1 empty. How should I avoid this problem? Is there any better coding method? Thanks a lot in advance!! Terence -- Dave Peterson |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question about "End(xlUp)" property
Hi,
Thanks a lot! -----Original Message----- I think I'd do something like: dim NextRow as long nextrow = range("a65536").end(xlup).row if isempty(range("A" & nextrow)) then 'do nothing else nextrow = nextrow + 1 end if Terence wrote: Hi, I am writing some codes to find out the last non-empty cell in column A of my worksheet by using the code "Range ("A65536").End(xlUp).Row", then I can write something new at the next row. However, if the cell (A1) at row 1 is empty, it doesn't return 0 but 1. If I write something at the next row, then it is written to row 2 (cell A2) but leaving cell A1 empty. How should I avoid this problem? Is there any better coding method? Thanks a lot in advance!! Terence -- Dave Peterson . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Object doesn't support this property or method" in Excel 2003 | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
VBA error: "object doesn't support this property or method" | Excel Discussion (Misc queries) | |||
"Disk is Full" add-on question to "Can't reset last cell" post tod | Excel Discussion (Misc queries) | |||
Question about "End(xlUp)" property | Excel Programming |