I tried writing macros wherein rows are hidden based on a cell value (which is a Data Validation dropdown):

Using the following code:
Private Sub Worksheet_Change(ByVal Target As Range) If Target = Range("C15") Then BeginRow = 17 EndRow = 25 ChkCol = 4 For RowCnt = BeginRow To EndRow If Cells(RowCnt, ChkCol).Value = Cells(15, 3).Value Then Cells(RowCnt, ChkCol).EntireRow.Hidden = False Else Cells(RowCnt, ChkCol).EntireRow.Hidden = True End If Next RowCnt End If exitHandler: Application.EnableEvents = True End Sub It is doing the thing I need but the problems I'm facing are, it is taking time for any change in C15 (actual data has around 100 rows) and also when I'm trying to make any changes in rest of the sheet, it throws an error -
"Run-time error '13': Type Mismatch".
I have no macros experience and I'm not sure what I'm doing wrong. Could you please help me correct the code. If there is a better way to achieve the same task in a more efficient way, please do let me know.
