Conditional Formatting to Hide Rows or Columns?

sczegus

New Member
Joined
Sep 26, 2006
Messages
2
I'm currently using Excel 2002 SP3. I use conditional formatting in many of my spreadsheets, but I haven't been able to figure out how to "Hide" a row or column based on a certain condition. Is there a method for doing this already built into Excel's functionality, and if not, is there a way to do it with VBA? Any help would be greatly appreciated! Thank you.
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,453
Hello sczegus, welcome to the board.
As far as I know you can't hide rows/columns with Conditional Formatting.
You can certainly do it using vba.
What range(s) would you be working with and what criteria do you want to use?
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,453
you can also do it using filters without vba
Oh, absolutely. It can be done using Group & Outline as well. (Plenty of options.)
-I guess I inferred by the desire to use CF that it was wanted to be done automatically
as opposed to manually.
 

sczegus

New Member
Joined
Sep 26, 2006
Messages
2
Thank you for the suggestions! To clarify my situation, I'm working with an attendance form that has over 45 rows to accomodate different activities, and 16 columns to accomodate each day in the timeframe (1st to the 15th, or 16th to the end of the month). I want the attendance form to be as uncluttered as possible, so I'm looking for a way to automatically hide the rows (row height=0) that aren't being used, and to automatically hide the columns (column width=0) that aren't necessary for the current timeframe (i.e. the last 3 columns when the timeframe is February 16th to February 28th).

For simplicity sake, let's say the range is rows 1-10, and I'm trying to individually hide rows where the cell in the A column contains the word "HIDE".

Thank you in advance for any help you can provide!
 

Watch MrExcel Video

Forum statistics

Threads
1,108,911
Messages
5,525,588
Members
409,652
Latest member
strangelyangely

This Week's Hot Topics

Top