I am new to macros in excel. I have a column that is currently empty but will be inputted with dates soon.
What i want to do is have two macros: one will go through the entire spreadsheet and select the rows that have a date in the aforementioned column cell AND hide that particular row. The other will do the opposite - it will unhide the rows that were previously hidden.
'hides rows that contain numbers
Range("A1").EntireColumn.SpecialCells(xlCellTypeConstants, xlNumbers).EntireRow.Hidden = True
'unhides all rows
Cells.EntireRow.Hidden = False
Macro1 hides all rows containing numbers
as Excel interprits dates as numbers then these rows will be hidden
it looks for numbers in column A
You can also try Select Case in VBA. Something like...
Select Case ActiveCell.Value
'using shades code.
.ColorIndex = 36
.Pattern = xlSolid
'Do Nothing or hide.
'Do somthing else.
'Catch everything else...do something...do nothing.
Loop Until (some end condition)