working with dates and text

Felicia Melocoton

New Member
Joined
Jan 30, 2005
Messages
5
Need help with this Formula

=IF(OR(AND(E8>0, E8<$H$7, E8=""), And(E8>0, E8<$H$7, E8)),"Fail","Pass"

My Question is:

D8 column is the Date when Form was given, so there is data

E8 column is Date completed - If there is data entered which is a date, the result on F8 column which is the status column should be a Pass, automatically

E8 column is Date completed - if there is no data entered, the result on F8 column, which is the status column should be a Fail

again, please help!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
How about:
=IF(E8=0,"Fail","Pass")

You can add formulas instead of "Pass" to include your other criteria.
 
Upvote 0
Hi,

Excel native worksheet functions fall short (compared to VBA) when checking for an actual Excel validated date. You can test for this in VBA, but there is no built in function to do so. I usually use a UDF such as the below to add such functionality to my spreadsheets...


<font face=Courier New><SPAN style="color:#00007F">Option</SPAN> <SPAN style="color:#00007F">Explicit</SPAN>

<SPAN style="color:#00007F">Function</SPAN> ISADATE(cel <SPAN style="color:#00007F">As</SPAN> Range) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN>
<SPAN style="color:#007F00">' Zack Barresse, 2004</SPAN>
    <SPAN style="color:#00007F">If</SPAN> IsDate(cel) <SPAN style="color:#00007F">Then</SPAN> ISADATE = <SPAN style="color:#00007F">True</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN></FONT>


Then just test like ...

=ISADATE(A1)

This will return a TRUE if it is a date recognized by Excel, or a FALSE if it is not. I would have used ISDATE, but that is the reserved method's name in VBA. :LOL:



HTH


(Hiya Tactps!!)
 
Upvote 0

Forum statistics

Threads
1,203,242
Messages
6,054,354
Members
444,718
Latest member
r0nster

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