Can I hide rows via formula only, no VBA?

TAPS_MikeDion

Well-known Member
Joined
Aug 14, 2009
Messages
619
Office Version
  1. 2011
Platform
  1. MacOS
Hi Everybody,

Is there a (conditional format?) formula that can be used to hide a number of rows if there is a value in a cell? I'm unable to use VBA (VBA would be my preference, but long story short...it needs to be a formula.) I'm putting in a column called "HIDE" and what I was hoping to do is hide a set of rows when there is an X in the HIDE column.

Example:
There are hundreds of rows of data. However, if certain employees are not receiving a paycheck for the current pay period, but are still employed with company, I would like to simply hide the rows with that employees data. In the example below, I was hoping to do something to the effect (unless someone has a better suggestion) of putting an X in the HIDE column, and having Excel hide all rows below that, until it detects the next occurrence of an "X". This way, I merely put an X in the HIDE column to hide those rows or delete the X to show all of that employees data again.

In the example below, the result would be that with an X in rows 2 and 16, the rows 3 - 6, and rows 17 - 21 would be hidden.

Thank you VERY MUCH for any help given!

Book1
ABCDE
1HIDENAMELOCATIONHOURSTOTAL HRS
2xJohn
3A
4B
5C
6x0
7Lisa
8
9A80
1080
11Wendell
12
13C40
14D20
1560
16xSamantha
17
18A
19C
20D
21x0
22
Sheet1
Cell Formulas
RangeFormula
E6,E21E6=SUM(D3:D5)
E10E10=SUM(D9)
E15E15=SUM(D13:D14)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
A formula cannot hide rows. However if you put an X into every row that should be hidden, you could use the autofilter.
 
Upvote 0
Solution
Thanks Fluff. I tried that earlier and it worked okay, but my concern is that both of my bosses know almost nothing about Excel and have messed up things on me many times in the past once the workbook was in their hands. Having the filters would be just fine for me, but I can see the headaches coming if they start changing stuff. I guess I'll go with that for now and cross my fingers. LOL
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,548
Messages
6,120,141
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top