I have an excel sheet named 'THISWEEK' with the following data in the following columns.…
- User
I have an excel sheet named 'THISWEEK' with the following data in the following columns. Coloum A2 downwards, Days of the week presented as dddd dd/mm/yyyy hh:mm Column D2 downwards also has the same data but presented as time only h:mm:ss Am or PM Column A can have either single or several rows of the same day. For each row group of the same day, I want to identify the earliest time and change the cell backgound color (Green) of the equivalent cell in the same row in column D. If the day in a row is on a single row and not part of a group of the same day then the cell in column D will be Green. The only time a cell in column D should not have the background colour changed to Green is if the cell value in column B is 'No Bookings' Can you please write a VBA code that can do this for all the days or groups of days.
- Assistant
- User
The code runs without errors. However it is not identifying the correct earliest time. The times in the spread sheet are presented as 12 hour formats h:mm:ss AM/PM so there are no leading 0. Eight thirty PM is therefore shown as 8:30:00 PM
- Assistant
Apologies for the oversight. To handle the 12-hour format correctly, you can make a slight modification to the code. Update the line with the following code:
- User
it is still not identigying the earliest time. A day may exist containing 4 to 5 rows in its group and in this instance only the earliest time of the group should be highlighted
- Assistant