# Automatically Hide Rows based on Formula driven Cell Value

#### AKMAKM

##### New Member
I want to automatically hide/unhide rows/content when I select certain value in a specified cell.

I have two values in cell (C21) formula based, changing automatically when the value change in cell (B5) in sheet named (REPORT CARD)

The values of (C21) is 900 and 1000

Im trying to Clear or Hide the values and text in Row "18" if the value of (C21)= 900 and unhide (text and furomulas) in Row "18" when the value (C21)= 1000.

Appreciate any help at all, thanks in advance!

Report Card.xlsm
ABCDEFGHIJ
4Roll No.1001ID Number198365391TermTerm 1
5Student NameTest 1ClassBoys 01 Year2021
6
7SubjectsTerm 1
8Class room participat-ionPop up quizzesHomeworkMidterm ExamProjects & ResearchesFinal ExamSCOREGrade
9201015151030
10Language Arts0000000A
11English0000000A+
12Mathematics0000000C
13Science0000000C+
14Social Studies0000000A
15Computer0000000F.I
16Art0000000C
17French0000000C+
18Health and Safety0000000A
19
21OUT OF900OUT OF
Report Card
Cell Formulas
RangeFormula
B4B4=IFERROR(INDEX('Student Database'!\$B\$2:\$B\$134,MATCH('Report Card'!B5,'Student Database'!\$C\$2:\$C\$134,0)),"")
G4G4=IFERROR(INDEX('Student Database'!\$E\$2:\$E\$134,MATCH('Report Card'!B5,'Student Database'!\$C\$2:\$C\$134,0)),"")
G5G5=IFERROR(INDEX('Student Database'!\$D\$2:\$D\$134,MATCH('Report Card'!B5,'Student Database'!\$C\$2:\$C\$134,0)),"")
C7C7=J4
I10:I18I10=C10+D10+E10+F10+G10+H10
C21C21=VLOOKUP(\$G\$5,'Class & Marks setting'!A2:B14,2,FALSE)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J10:J18Cell Valuetop 10% valuestextNO
J10:J18Other TypeColor scaleNO
Cells with Data Validation
CellAllowCriteria
B5:D5List=OFFSET('Student Database'!\$C\$2,,,COUNTA('Student Database'!\$C\$2:\$C\$134))

Report Card.xlsm
AB
1ClassMarks out of
2Boys 01 900
3Boys 02900
4Boys 03900
5Girls 01900
6Girls 02900
7Girls 03900
841000
951000
1061000
1171000
1281000
1391000
14101000
Class & Marks setting

Report Card.xlsm
ABCDEFG
211001Test 1Boys 01 198365391(44) 211-9093224-KAD IN ROLL
321002Test 2Boys 02198365381(44) 211-9083223-KAD IN ROLL
431003Test 3Boys 03198365371(44) 211-9073222-KAD IN ROLL
541004Test 4Giarls 01198365361(44) 211-9063221-KAD IN ROLL
651005Test 5Giarls 02198365351(44) 211-9053224-KAD IN ROLL
761006Test 6Giarls 03198365341(44) 211-9043223-KAD IN ROLL
1817
Student Database
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:G134Expression=\$J\$4=ROW()textNO

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for the sheet with the formula in cell C21 and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet.
VBA Code:
Private Sub Worksheet_Calculate()
Select Case Range("C21").Value
Case Is = 900
Rows(18).Hidden = True
Case Is = 1000
Rows(18).Hidden = False
End Select
End Sub

Replies
5
Views
402
Replies
1
Views
385
Replies
5
Views
212
Replies
5
Views
484
Replies
7
Views
533

1,203,677
Messages
6,056,685
Members
444,883
Latest member
garyarubin

### 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.

### Which adblocker are you using?

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

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