Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Find Last Row Hidden

Just came across this today.....

Maybe someone can explain ???

I was always under the impression that
Range("A" & Rows.Count).End(xlUp).Row
would give the last row with a value in the chosen column.

If I have data in rows 1 thru 10, the above returns 10.
If I hide rows 9 & 10, it returns 8??

I would have thought that I'd have to specify Visible Cells
to get a result like that.

Thanks,
John


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find Last Row Hidden

It looks to me (in my ignorance) as if Excel is doing exactly as
requested.

Try this one on your sheet with rows hidden. Once again Excel wins. :-
'---------------------------------------------------------------------
Set foundcell = ActiveSheet.Cells.Find(What:="*", _
SearchDirection:=xlPrevious, SearchOrder:=xlByRows)
MsgBox (foundcell.Row)
'-----------------------------------------------------------------------

It's the way we ask. This is definitely one (two) for the archives.
Thanks for the observation !


---
Message posted from http://www.ExcelForum.com/

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
how do i find out what data is hidden i excel dan cassidy Excel Worksheet Functions 1 March 26th 10 06:55 PM
Find last row with hidden rows Sherry Excel Discussion (Misc queries) 2 October 13th 08 08:01 PM
how to find out if a row is hidden Ray Excel Worksheet Functions 3 August 29th 08 05:05 AM
find hidden data in worksheet catlover1946 Excel Worksheet Functions 0 July 7th 06 03:50 AM
How to find hidden text Judy Ward Excel Worksheet Functions 0 January 20th 06 01:33 AM


All times are GMT +1. The time now is 01:00 AM.

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

About Us

"It's about Microsoft Excel"