S
Steve
HYCH
Have Columns of Data in a spreadsheet, Column D (4) is the starting
column and Column AX (50) has the last of the data, these cells in
this range contain single letters denoting a shift worked, have what i
thought would enable me to hide columns that were differents letters
and only display the ones that had the letter "A" in them, but get
error.
Works fine if i am hiding rows with some changes to it, ie beginrow
rather than beginCol, any help would be appreciated.
Sub TextBox3_Click()
Application.ScreenUpdating = False
beginCol = 4
EndCol = 50
ChkRow = 2
For ColCnt = beginCol To EndCol
If Cells(ColCnt, ChkRow).Text <> "a" Then
Cells(ColCnt, ChkRow).EntireCol.Hidden = True
Else
Cells(ColCnt, ChkRow).EntireCol.Hidden = False
End If
Next ColCnt
Application.ScreenUpdating = True
End Sub
Steve
Have Columns of Data in a spreadsheet, Column D (4) is the starting
column and Column AX (50) has the last of the data, these cells in
this range contain single letters denoting a shift worked, have what i
thought would enable me to hide columns that were differents letters
and only display the ones that had the letter "A" in them, but get
error.
Works fine if i am hiding rows with some changes to it, ie beginrow
rather than beginCol, any help would be appreciated.
Sub TextBox3_Click()
Application.ScreenUpdating = False
beginCol = 4
EndCol = 50
ChkRow = 2
For ColCnt = beginCol To EndCol
If Cells(ColCnt, ChkRow).Text <> "a" Then
Cells(ColCnt, ChkRow).EntireCol.Hidden = True
Else
Cells(ColCnt, ChkRow).EntireCol.Hidden = False
End If
Next ColCnt
Application.ScreenUpdating = True
End Sub
Steve