I have been facing a problem for some time now with my Excel macro and I have not been able to find a solution anywhere. What I want to do is described below:
I have an Excel sheet that includes the EPG information of a TV channel for the current month.
One column includes the names of the TV programs/events. Next to it, another column that includes the corresponding start time of each TV program (e.g. 13:15) and a third column that includes the corresponding date of each event (20/07/2012).
The problem is that the day does not change after 00:00 as it should but it changes at 06:00 in the morning instead. I want a macro that searches the whole time column, find any time that is between 00:00 06:00 and go to the corresponding date cell and change the date (add one day). Is that possible, and how?
You don’t need VBA. Insert a column just after your date column. I’m assuming now that your times are in column B and your dates are in column C. now in your new column D put the formula
Then you can hide column C if you like. And change the number format of column D to be a date. I’m not 100% sure on the syntax for comparing a time though, i.e. the
A1 >= 00:00but according to this thread: http://www.excelbanter.com/showthread.php?t=212849 it should be