xxcucumberxx
New Member
- Joined
- Feb 23, 2016
- Messages
- 7
I really need someones help. I need a code for a macro to scan column M and highlight invalid birth-dates. Only to skip short date (by short date i mean is like this 01/01/1901) only that format, anything other than a shot date to highlight all the way down to the last row with data on it. Not to the end of the excel spreadsheet. Please help ive been trying for the pas week to figure it out but nothing seems to work. Thank you so much who can help!!@@
The code i used
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">Dim c As Range
For Each c In Selection
If Not IsDate(c.Value) And c.Value <> vbNullString Then
c.Font.ColorIndex = 3
End If
Next c</code>But its not finding all the invalid dates
Maybe there is a completely different macro i can use or something
If it can start the scan from column "M" Row "2"
The code i used
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">Dim c As Range
For Each c In Selection
If Not IsDate(c.Value) And c.Value <> vbNullString Then
c.Font.ColorIndex = 3
End If
Next c</code>But its not finding all the invalid dates
Maybe there is a completely different macro i can use or something
If it can start the scan from column "M" Row "2"