Hiding Rows using Conditional Formatting

ackiss

New Member
Joined
Aug 26, 2005
Messages
17
Excel 2003

Is there any way to hide Rows using Conditional Formatting rather than VBA?

I currently have a budget spreadsheet with thousands of standard rows but only 50 or so are utilized for any one project. I'd like to hide all the line items that have a budget = 0.

I'm not versed on VBA, and was hoping to find another way to accomplish.
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,048
Office Version
  1. 365
Platform
  1. Windows
You can't hide rows using conditional formatting.

But you could turn the text in the rows to an appropriate colour so you won't see the data.

But I don't think that's what you want is it?
 

ackiss

New Member
Joined
Aug 26, 2005
Messages
17
That's what I was afraid of.

No, making the text white won't do the trick. Since I have thousands of rows, my goal is to try and fit the relevant rows onto one screen to eliminate scrolling, and prevent errant entry into unused rows.

I basically just want to evaluate the values in column H and hide the row if the value = 0.

If anyone has any previously used code to make this happen, I guess its time for me to take my first dip into the VB pool!
 

DominicB

Well-known Member
Joined
Oct 3, 2005
Messages
1,569
Good evening ackiss

Have you considered using the autofilter (Data > Filter > Autofilter)? That could quite easily hide any lines where your budget equals zero.

HTH

DominicB
 

ackiss

New Member
Joined
Aug 26, 2005
Messages
17
Auto Filter is one strategy I tried before. It does a pretty good job but I ran into problems when there are merged cells in the columns you want to filter.

After a little research, I've found some ways to adapt this to what I want to do, its just not quite what I had in mind. I had envisioned some sort of macro that I could assign to a button that would basically toggle between hiding all the zeros and showing all rows.

Thanks for the input though. Until I get fancier, I can use the autofilter.
 

TrippyTom

Well-known Member
Joined
Nov 16, 2004
Messages
587
Merged cells are the DEVIL! :devilish: (so are Pie Charts)

Instead of merging the cells, use Center Across Selection. I've found that merged cells tend to make my files corrupt for some reason, as well as cause other problems like you are experiencing.

Once you change that, I think autofilter will work for you.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,231
Messages
5,571,028
Members
412,355
Latest member
BasicExelHelp
Top