Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
singlgl1
 
Posts: n/a
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.misc
singlgl1
 
Posts: n/a
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
To find equation for two sets of non contiguous data vijaya Charts and Charting in Excel 2 November 7th 05 03:46 AM
Charts not recognizing source data if original linked data is changed. JLC Charts and Charting in Excel 3 October 14th 05 01:29 AM
Compare data in two columns to find duplicates. Dan Excel Discussion (Misc queries) 2 October 5th 05 04:42 AM
"Link to other data source" - How can I find out what is linked? Chicago D Excel Discussion (Misc queries) 2 August 24th 05 08:19 PM
How do I find an unknown value on a line made from known data? brendas182 Excel Discussion (Misc queries) 2 June 30th 05 03:33 AM


All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"