You can do this with some simple VBA code:
Sub AAA()
Dim Rng As Range
Dim Found As Boolean
For Each Rng In Range(Cells(1, 1), Cells(1, Columns.Count)).Cells
If Rng.Value = Date Then
Found = True
Exit For
End If
Next Rng
If Found = True Then
Range(Rng(1, 2), Cells(1, Columns.Count)).EntireColumn.Hidden
= True
End If
End Sub
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"PPM at Brackmills" <PPM at
wrote in message
...
I have a table with dates as the top row. I want Excel to find
todays date
and then hide the columns after todays date. In this way I can
make the
printed output bigger and more readable.