Hide cells if month different from previous cell

Pitbull_Raven

New Member
Joined
Jun 19, 2008
Messages
13
Hi.

I have searched but didn't find anything similar. Found some posts about dates but nothing like what I am searching for.

My question:

We work with a worksheet to register quality issues occurred during a certain month. The sheet is printed out a few days before the start of the new month.

In my sheet I have cell H1 where I type in the first day of the month, say 01-11-2010 and formated so it shows only the month (November).

Updating this cell causes the cells from B5 to B35 to change accordingly. The problem is the last cell displays 01-12-2010. I have to either delete or format the cell out. How can I hide cells with month different from H1 automatically? Problem is even worse in February so the solution cant be something like "hide if different from previous cell". Has to be more along the lines of "hide if different from H1" I guess.

Appreciate any help!!! Thanks!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Excel Workbook
B
5February
6
7February 1, 2010
8February 2, 2010
9February 3, 2010
10February 4, 2010
33February 26, 2010
34February 27, 2010
35February 28, 2010
36
37
38
...
Cell Formulas
RangeFormula
B7=B5
B8=$B$5+ROW(1:1)
B9=$B$5+ROW(2:2)
B10=$B$5+ROW(3:3)
B33=$B$5+ROW(25:25)
B34=IF(MONTH($B$5+ROW(26:26))=MONTH($B$5),$B$5+ROW(26:26),"")
B35=IF(MONTH($B$5+ROW(27:27))=MONTH($B$5),$B$5+ROW(27:27),"")
B36=IF(MONTH($B$5+ROW(28:28))=MONTH($B$5),$B$5+ROW(28:28),"")
B37=IF(MONTH($B$5+ROW(29:29))=MONTH($B$5),$B$5+ROW(29:29),"")
B38=IF(MONTH($B$5+ROW(30:30))=MONTH($B$5),$B$5+ROW(30:30),"")
 
Upvote 0
Excel Workbook
B
5February
6
7February 1, 2010
8February 2, 2010
9February 3, 2010
10February 4, 2010
33February 26, 2010
34February 27, 2010
35February 28, 2010
36
37
38
...
Cell Formulas
RangeFormula
B7=B5
B8=$B$5+ROW(1:1)
B9=$B$5+ROW(2:2)
B10=$B$5+ROW(3:3)
B33=$B$5+ROW(25:25)
B34=IF(MONTH($B$5+ROW(26:26))=MONTH($B$5),$B$5+ROW(26:26),"")
B35=IF(MONTH($B$5+ROW(27:27))=MONTH($B$5),$B$5+ROW(27:27),"")
B36=IF(MONTH($B$5+ROW(28:28))=MONTH($B$5),$B$5+ROW(28:28),"")
B37=IF(MONTH($B$5+ROW(29:29))=MONTH($B$5),$B$5+ROW(29:29),"")
B38=IF(MONTH($B$5+ROW(30:30))=MONTH($B$5),$B$5+ROW(30:30),"")

Also did the trick. Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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