Excel "IF" function with DATE in test cell
Closed
LNTP3
-
Aug 16, 2016 at 11:34 PM
TrowaD
TrowaD
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Related:
- Excel "IF" function with DATE in test cell
- Excel "IF" function w/ date in test cell ✓ - Forum - Excel
- Excel if function if cell contains specific text ✓ - Forum - Excel
- Excel multiple functions in one cell - Forum - Excel
- Excel apply function to multiple cells - Guide
- Excel function search for text in cell ✓ - Forum - Word
1 reply
TrowaD
Aug 25, 2016 at 11:02 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Aug 25, 2016 at 11:02 AM
Hi LNTP3,
What if AL2 has no date, but AM2 does?
See if this is what you are after:
Start by implementing a UDF (user defined function):
Open VB by hitting Alt+F11 > Insert module and paste the following in the big white field:
Now try a formula like this:
=IF(CheckDate(AL2)=TRUE,"IN TRANSIT",IF(CheckDate(AM2)=TRUE,"RECEIVED","IN TRANSIT"))
Best regards,
Trowa
What if AL2 has no date, but AM2 does?
See if this is what you are after:
Start by implementing a UDF (user defined function):
Open VB by hitting Alt+F11 > Insert module and paste the following in the big white field:
Function CheckDate(rng As Range) As Boolean CheckDate = IsDate(rng) End Function
Now try a formula like this:
=IF(CheckDate(AL2)=TRUE,"IN TRANSIT",IF(CheckDate(AM2)=TRUE,"RECEIVED","IN TRANSIT"))
Best regards,
Trowa