LordVoldetort_IV
New Member
- Joined
- Jun 10, 2021
- Messages
- 38
- Office Version
- 365
- Platform
- Windows
VBA Code:
Sub Hide_Rows()
With Worksheets("Tax Calculation")
'BeginRow = from which row you want to start checking
'EndRow = to which row you want to check
'ChkCol = in which collom is the value to check
BeginRow = 1
EndRow = 160
ChkCol = 19
For RowCnt = BeginRow To EndRow
If Worksheets("Tax Calculation").Cells(RowCnt, ChkCol).Value = "HIDE" Then
Worksheets("Tax Calculation").Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else: Worksheets("Tax Calculation").Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
End With
End Sub
Hello! the above code is what i use to hide a row based on a value in the same row, but different column. I want to switch it around and hide a column based on a value in the same column, different row. i cant seem to figure it out, would appreciate any help!