I have a header row that contains text and dates, the dates are formatted as Sep-02 etc. and am using an input box to loop through each cell till I find the correct date eg
Item Descr Qty Jul-02 Aug-02 Sep-02
The code I was using is something like this:
Dim Month as Date
Month = InputBox("Please enter the month eg Sep-02")
Range("A2").Select
Do While ActiveCell.Value <> Month
ActiveCell.Offset(0, 1).Select
Loop
This gives an error message on the first cell as it is Text and not a Date. In the past I've usually had the header formatted as text and been able to work around the problem but in this case it is not an option to change the format.
I hate working with dates.
Item Descr Qty Jul-02 Aug-02 Sep-02
The code I was using is something like this:
Dim Month as Date
Month = InputBox("Please enter the month eg Sep-02")
Range("A2").Select
Do While ActiveCell.Value <> Month
ActiveCell.Offset(0, 1).Select
Loop
This gives an error message on the first cell as it is Text and not a Date. In the past I've usually had the header formatted as text and been able to work around the problem but in this case it is not an option to change the format.
I hate working with dates.