Automatically Hide Rows based on Formula driven Cell Value

AKMAKM

New Member
Joined
Jan 13, 2022
Messages
10
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
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
20TOTAL MARKSGRADEPOSITION
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
1Sr.#Roll No.Student NameClassID NumberContact No.Address
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
871007Test 71198365331(44) 211-9033222-KAD IN ROLL
981008Test 82198365321(44) 211-9023221-KAD IN ROLL
1091009Test 93198365311(44) 211-9013224-KAD IN ROLL
11101010Test 104198365301(44) 211-9003223-KAD IN ROLL
12111011Test 115198365291(44) 211-8993224-KAD IN ROLL
13121012Test 126198365281(44) 211-8983223-KAD IN ROLL
14131013Test 137198365271(44) 211-8973222-KAD IN ROLL
15141014Test 148198365261(44) 211-8963221-KAD IN ROLL
16151015Test 159198365251(44) 211-8953224-KAD IN ROLL
17161016Test 1610198365241(44) 211-8943223-KAD IN ROLL
1817
Student Database
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:G134Expression=$J$4=ROW()textNO
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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