Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
End of Spreadsheet
Writing a VBA in Excel, how do I know if I am at the last row of data? The
column I am processing may have empty cells. But an adjourning cell will always have something until the end of rows is reached. Is there an equivalent EOF or do I examine the adjourning column as I process? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
End of Spreadsheet
My preference is to create a range to seach and then traverse that range...
Something like this dim rngToSearch as range dim rng as range with Sheets("sheet1") set rngToSearch = .range("A2", .cells(rows.count, "A").end(xlUp)) for each rng in rngToSearch msgbox rng.address next rng end with -- HTH... Jim Thomlinson "Chas" wrote: Writing a VBA in Excel, how do I know if I am at the last row of data? The column I am processing may have empty cells. But an adjourning cell will always have something until the end of rows is reached. Is there an equivalent EOF or do I examine the adjourning column as I process? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
End of Spreadsheet
lastrow=cells(rows.count,"e").end(xlup).row
cells(lr,"d")=1 -- Don Guillett SalesAid Software "Chas" wrote in message ... Writing a VBA in Excel, how do I know if I am at the last row of data? The column I am processing may have empty cells. But an adjourning cell will always have something until the end of rows is reached. Is there an equivalent EOF or do I examine the adjourning column as I process? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
link a local spreadsheet to a network shared spreadsheet | Setting up and Configuration of Excel | |||
Transmitting data from a server spreadsheet to a client spreadsheet | Excel Programming | |||
conversion of MS Works Spreadsheet to Excel 2002 Spreadsheet | Excel Discussion (Misc queries) | |||
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? | Excel Discussion (Misc queries) | |||
How to open another Excel spreadsheet to copy data into current spreadsheet ? | Excel Programming |