Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Is it possible to tell if a cell is hidden by 'Autofilter'

? cells(18,4).EntireRow.Hidden
False
Rows(18).Hidden = True
? cells(18,4).EntireRow.Hidden
True


--
Regards,
Tom Ogilvy


TonyJeffs wrote in message
om...
Suppose I use the autofilter command so that only rows 10 16 18 22 are

visible,
Is it possible to establish whether a cell is visible using a macro?
Something like:
msgbox cells(18,4).visible

Thanks
Tony



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Is it possible to tell if a cell is hidden by 'Autofilter'

you might want to think a bit differently

dim rng as Range
dim rng1 as Range
set rng = Activesheet.Autofilter.Range.Columns(1).cells
' adjust range not to include header row
set rng = rng.offset(1,0).Resize(rng.rows.count-1)
' adjust range to refer only to visible cells
On Error Resume Next
set rng1 = rng.SpecialCells(xlVisible)
On Error goto 0
if not rng1 is nothing then
for each cell in rng1
sStr = sStr & cell.Address & ", "
Next
sStr = left(sStr,len(sStr)-2)
msgbox sStr
Else
msgbox "No visible rows"
End if

This will allow you to work with the visible cells in the filter


Tom Ogilvy wrote in message
...
? cells(18,4).EntireRow.Hidden
False
Rows(18).Hidden = True
? cells(18,4).EntireRow.Hidden
True


--
Regards,
Tom Ogilvy


TonyJeffs wrote in message
om...
Suppose I use the autofilter command so that only rows 10 16 18 22 are

visible,
Is it possible to establish whether a cell is visible using a macro?
Something like:
msgbox cells(18,4).visible

Thanks
Tony





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
HELP: Selecting Non-Visible (Hidden) Cells with AutoFilter Applied west8100 Excel Discussion (Misc queries) 3 February 11th 09 11:26 PM
HELP: Selecting Non-Visible (Hidden) Cells when AutoFilter is Appl west8100 Excel Worksheet Functions 2 February 11th 09 09:20 PM
HELP: Selecting Non-Visible (Hidden) Cells with AutoFilter Applied west8100 Excel Discussion (Misc queries) 0 February 10th 09 09:28 PM
HELP: Selecting Non-Visible (Hidden) Cells with AutoFilter Applied west8100 Excel Discussion (Misc queries) 0 February 10th 09 09:28 PM
Is it possible to tell if a cell is hidden by 'Autofilter' Dave Peterson[_3_] Excel Programming 0 September 1st 03 04:29 PM


All times are GMT +1. The time now is 06:56 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"