![]() |
find last row with data
I have an excel file that is looking at another file to get an array of info.Currently it is going to the first blank row then looking up one row and retrieving that info.I have pasted below the function as it is currently written .Can someone show me an editing of this that will tell it to simply read the bottom row with data. Thankss-Greg Function FindBlankRow() x = 2 Do While ActiveSheet.Cells(x, 1) < "" x = x + 1 Loop FindBlankRow = x - 1 -- singlgl1 ------------------------------------------------------------------------ singlgl1's Profile: http://www.excelforum.com/member.php...o&userid=26389 View this thread: http://www.excelforum.com/showthread...hreadid=488238 |
find last row with data
dim LastCell as range
with workbooks("someworkbook").worksheets("Someworkshee t") set lastcell = .cells(.rows.count,"A").end(xlup) end with msgbox lastcell.value & "--" & lastcell.address(0,0) & "--" & lastcell.row I got the lastcell from column A. singlgl1 wrote: I have an excel file that is looking at another file to get an array of info.Currently it is going to the first blank row then looking up one row and retrieving that info.I have pasted below the function as it is currently written .Can someone show me an editing of this that will tell it to simply read the bottom row with data. Thankss-Greg Function FindBlankRow() x = 2 Do While ActiveSheet.Cells(x, 1) < "" x = x + 1 Loop FindBlankRow = x - 1 -- singlgl1 ------------------------------------------------------------------------ singlgl1's Profile: http://www.excelforum.com/member.php...o&userid=26389 View this thread: http://www.excelforum.com/showthread...hreadid=488238 -- Dave Peterson |
find last row with data
Thanks for the input. -- singlgl1 ------------------------------------------------------------------------ singlgl1's Profile: http://www.excelforum.com/member.php...o&userid=26389 View this thread: http://www.excelforum.com/showthread...hreadid=488238 |
All times are GMT +1. The time now is 04:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com