I am looking to write a formula to highlight childrens birthdays. Ie all of the children who have a birthday in Jan, Feb, Mar etc!! The dates are in DD/MM/YYYY format. I have spent some time looking around google and as yet have not come up with the answer.
Any suggestions would be appreciated!!
you could use the code below do to conditional formating
Private Sub Worksheet_Change(ByVal Target As Range)
Dim weekday As String
Dim vColor As Integer
Dim cell As Range
For Each cell In Target
weekday = cell.Value
vColor = 0 'default is no color
Select Case Format(weekday, "mmm")
vColor = 34
vColor = 36
Application.EnableEvents = False
cell.Interior.ColorIndex = vColor
Application.EnableEvents = True
hope this helps
Conditional Format is the way to go but if you are looking for something quick, highlight the relevant column, use Conditional Format to format the first range, then click on ADD do the next range and so on. It's not an elegant solution but it should work, assuming you can build up enough conditions. I don't know what the limit is.
I think you can only have three conditional formats, but with the code you can have as many as you need.
Originally Posted by laserblazer