Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default No match on Advanced Filter -- how to detect?

I have a user form that allows the user to filter data. If they filter
the data, I colour a few cells red so that they have a visual cue that
some rows are hidden.

However, if their criteria don't match any data in the database, then no
rows are hidden even though I have applied an advanced filter. If this
is the case, I don't want the cells coloured red.

I can count visible rows before the advanced filter and compare to
visible rows after the advanced filter, but I was wondering if there
might be a simpler way?

Activesheet.FilterMode = True after the advanced filter even if there
are no hidden rows, so that's out.

Any suggestions?

--
Dianne


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default No match on Advanced Filter -- how to detect?

Sigh. Never mind --

lngNumRowsVisible = Range("A:A").SpecialCells(xlCellTypeVisible).Count

If lngNumRowsVisible < 65536 Then
code
End if

--
Dianne


In ,
Dianne typed:
I have a user form that allows the user to filter data. If they filter
the data, I colour a few cells red so that they have a visual cue that
some rows are hidden.

However, if their criteria don't match any data in the database, then
no rows are hidden even though I have applied an advanced filter. If
this is the case, I don't want the cells coloured red.

I can count visible rows before the advanced filter and compare to
visible rows after the advanced filter, but I was wondering if there
might be a simpler way?

Activesheet.FilterMode = True after the advanced filter even if there
are no hidden rows, so that's out.

Any suggestions?



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
Advanced filter data match Kirk P. Excel Discussion (Misc queries) 1 December 16th 09 07:05 PM
Use Advanced Filter to Detect non blank rows Connie Excel Discussion (Misc queries) 0 October 19th 06 09:40 PM
advanced filter - can't match a long text cell simpsons_rule Excel Discussion (Misc queries) 7 May 14th 05 11:00 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM
advanced filter won't allow me to filter on bracketed text (-456.2 LucianoG Excel Discussion (Misc queries) 1 December 6th 04 08:38 PM


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