Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Actual row of a filtered row

Hello Group,

I am using the auto filter and when I filter the list I would like to
get the actual (blue) rows of the filtered data .
Using .row I get the sequential row counting from row 1.

Thanks,

Michael Singmin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Actual row of a filtered row

if you want to copy them, then the default is to copy only the visible rows

ActiveSheet.Autofilter.Range.Copy Destination:=Activesheet.Next.Range("A1")


If you want a reference to them

set rng = Activesheet.Autofilter.Range.Columns(1).Cells
set rng = rng.offset(1,0).Resize(rng.rows.count-1)
set rng1 = rng.Specialcells(xlVisible)
if not rng1 is nothing then
msgbox rng1.Entirerow.Address
End if

--
Regards,
Tom Ogilvy

"Michael Singmin" wrote in message
...
Hello Group,

I am using the auto filter and when I filter the list I would like to
get the actual (blue) rows of the filtered data .
Using .row I get the sequential row counting from row 1.

Thanks,

Michael Singmin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Actual row of a filtered row

Thank you Tom,

Your code is always interesting to look at.
But I was looking for this

For Each fs In Range("A1:A500").SpecialCells(xlCellTypeVisible)
Msgbox fs.row
Next

Cheers,

Michael Singmin
================================================== =======

"Tom Ogilvy" wrote:

if you want to copy them, then the default is to copy only the visible rows

ActiveSheet.Autofilter.Range.Copy Destination:=Activesheet.Next.Range("A1")


If you want a reference to them

set rng = Activesheet.Autofilter.Range.Columns(1).Cells
set rng = rng.offset(1,0).Resize(rng.rows.count-1)
set rng1 = rng.Specialcells(xlVisible)
if not rng1 is nothing then
msgbox rng1.Entirerow.Address
End if


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
Why is the actual calculation different from actual sample Joe Excel Discussion (Misc queries) 4 May 1st 10 11:46 PM
Return filtered values into report worksheet based on filtered valueon the data worksheet dicko1 Excel Worksheet Functions 1 April 21st 09 12:27 AM
MORTGAGES and ACTUAL/360 steve613 Excel Discussion (Misc queries) 0 November 15th 06 06:15 PM
traversing through a filtered range based on another filtered range zestpt[_4_] Excel Programming 4 July 12th 04 06:37 PM
Filtered Visible Rows & VBA Non-Filtered Rows Displayed QTE[_15_] Excel Programming 8 July 11th 04 02:21 AM


All times are GMT +1. The time now is 03:05 AM.

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"