KBartmanovich
New Member
- Joined
- Aug 6, 2010
- Messages
- 6
I am trying to write a VBA Macro to hide all columns with TEXT in a certain Row.
Background:
I have a spreadsheet, in ROW4 I have Dates and Quarterly totals. The Column names are as such:
"01/01/2008", "01/02/2008", "01/03/2008", "Q1, 2008" and so on.
I am trying to set it up so that all of the columns with the TEXT format ("Q1, 2008") can be hidden.
So far I have:
Dim intColCntr, intLastCol As Integer
Dim intNoColTtl As Integer
intColCntr = 3
Cells.Select
Selection.EntireColumn.Hidden = False
If Application.WorksheetFunction.IsText(Range("A4").Offset(intColCntr + 1) & "4") Then
Range(Columns("A4").Offset(0, intColCntr + 1) & "4").Select
Selection.EntireColumn.Hidden = True
End If
Please help. I am very new to writing VBA, and cannot seem to get this one to work AT ALL!!!
Kathryn
Background:
I have a spreadsheet, in ROW4 I have Dates and Quarterly totals. The Column names are as such:
"01/01/2008", "01/02/2008", "01/03/2008", "Q1, 2008" and so on.
I am trying to set it up so that all of the columns with the TEXT format ("Q1, 2008") can be hidden.
So far I have:
Dim intColCntr, intLastCol As Integer
Dim intNoColTtl As Integer
intColCntr = 3
Cells.Select
Selection.EntireColumn.Hidden = False
If Application.WorksheetFunction.IsText(Range("A4").Offset(intColCntr + 1) & "4") Then
Range(Columns("A4").Offset(0, intColCntr + 1) & "4").Select
Selection.EntireColumn.Hidden = True
End If
Please help. I am very new to writing VBA, and cannot seem to get this one to work AT ALL!!!
Kathryn