Conditional formatting, if not a date

Laavista

Board Regular
Joined
Aug 27, 2009
Messages
79
How do I enter a conditional format to highlight the cell if it's not a valid
date?

I tried "formula is":

=if(not isdate(C10))
<>if(isdate(C10))

Your help would be greatly appreciated!!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
ISDATE is NOT a worksheet function in Excel, although it does exist in VBA. It also exist in Data Validation. What are you really looking to do?

lenze
 
Upvote 0
I have a report from a supplier that is supposed to have dates. The date field occasionally has a dash or a word like "NotAvailable". In VBA, I check in the VBA whether it's a true date before I do a search on it , but I also want to highlight the cell which does not contain a true date in pink.

I could loop through the rows and check to see if it's a date, and if not, highlight the cell. I'd rather just do a conditional format, though.

Does this make sense?

Thanks for your help!
 
Upvote 0
Since dates are really just numbers, you can just use
Code:
=NOT(ISNUMBER(A1))
lenze
 
Upvote 0
Actually, that will work!

Thanks so much for taking the time to reply to my question. I really appreciate it!!
 
Upvote 0
Is there something I should be checkmarking to indicate you answered my question? (This is my first post on this forum).
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top