Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autofilter for conditional formatting

Status
Not open for further replies.

liltechy

Programmer
May 17, 2002
145
US
Is it possible to do a autofilter with conditional formatting? I have a small spreadsheet that I need to print every month but I do not want to print the months with 0.00. Below is the data that I have tried to autofilter without success.

MONTH Current Boardings YTD Boardings

Oct03 0.000 0.000
Nov03 0.000 0.000
Dec03 0.000 0.000
Jan04 0.558 0.558
Feb04 0.418 0.976
Mar04 0.604 1.581
Apr04 0.379 1.960
May04 0.375 2.335
Jun04 0.000 2.335
Jul04 0.000 2.335
Aug04 0.000 2.335
Sep04 0.000 2.335

With my conditional formatting, if column2 = 0.000 then it is red. When I try to filter on column2 to no show 0.000 it hides all 0.000. I need to show the first 3 months 0.000 when I print. How can I accomplish this. Is there some VBA code(macro) that could be written, so that when I get ready to print it would automatically hide the months that are not complete.

liltechy
 
There is one report that is printed that will need to show all data, so it all needs to be in one sheet.
 
I think you will probably need to use a helper column that gives you a marker such as TRUE/FALSE, or HIDE/SHOW based on the same conditional formatting rules that you are currently using to mark your data now. You can then filter on that column. Failing that you could use VBA to do it.

Regards
Ken.................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
When I try to filter on column2 to no show 0.000 it hides all 0.000. I need to show the first 3 months 0.000 when I print.

I tried this and it worked for me (Excel 2000). Maybe it will work for you.

Data>>Filter>>Advanced Filter>. Select your whole range. Then in the criteria box select only the data range. Click OK and its done.

Barbara
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top