# How to use conditional formatting to highlight specific days of the week AND time periods?

This answer regarding formatting on date time information Excel 2010 Conditional Formatting - TIME is a very, very technical answer that, in truth, I don't really understand! Hey-ho, I can deal with my ignorance....

However, this answer is also very exciting as it begins to prove there is a formulaic answer to my excel conditional formatting question;

How would i highlight a column of cells, holding date and time format (e.g.; Mon 22/10/2014 17:34) to pick out the times that are a) Monday to Friday, and b) between a given time period (e.g.; 15:00-15:45)?

• Welcome to Super User. What have you attempted so far? Are the cells actually formatted as date/time or is it text? – CharlieRB Jan 8 '15 at 17:47

Look up Time & Date functions in the Excel help.
Example: WEEKDAY() will take a date and give back a numeric value, representing the number of days from monday (or sunday=1... sat=7, if you set the second argument to 1 instead of 0).
Additionally TEXT() will allow to pick out portions of a "date & time" (using the same syntax as custom formatting),
=IF(AND(WEEKDAY(A1;0)<5;TEXT(A1;"HH:MM")>"14:00";TEXT(A1;"HH:MM")<"15:00");True;False)