Date format help

jcaptchaos2

Well-known Member
Joined
Sep 24, 2002
Messages
1,032
Office Version
  1. 365
Platform
  1. Windows
Hello,
How do I format the second half of this formula to be in date format?

Code:
=IF(ISNA(IF(ISNA(VLOOKUP(G25&"",WIP!B$3:F$539,5,FALSE)),VLOOKUP(H25&"",WIP!B$3:F$539,5,FALSE),VLOOKUP(G25&"",WIP!B$3:F$539,5,FALSE))),"--",IF(ISNA(VLOOKUP(G25&"",WIP!B$3:F$539,5,FALSE)),VLOOKUP(H25&"",WIP!B$3:F$539,5,FALSE),VLOOKUP(G25&"",WIP!B$3:F$539,5,FALSE)))&"  "&IF(ISNA(VLOOKUP(F25,'Ship dates - Notes'!F$3:G$704,2,FALSE)),IF(ISNA(VLOOKUP(G25,'Ship dates - Notes'!A$1:B$777,2,FALSE)),"",VLOOKUP(G25,'Ship dates - Notes'!A$1:B$777,2,FALSE)),(VLOOKUP(F25,'Ship dates - Notes'!F$3:G$704,2,FALSE)))
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
From here on

Code:
&IF(ISNA(VLOOKUP(F25,'Ship dates - Notes'!F$3:G$704,2,FALSE)),IF(ISNA(VLOOKUP(G25,'Ship dates - Notes'!A$1:B$777,2,FALSE)),"",VLOOKUP(G25,'Ship dates - Notes'!A$1:B$777,2,FALSE)),(VLOOKUP(F25,'Ship dates - Notes'!F$3:G$704,2,FALSE)))[/Code}
 
Upvote 0
Try:

&TEXT(IFERROR(VLOOKUP(F25,'Ship dates - Notes'!F$3:G$704,2,FALSE),IFERROR(VLOOKUP(G25,'Ship dates - Notes'!A$1:B$777,2,FALSE),"")),"dd/mm/yyyy")

You can alter the blue part for whatever formatting you want.
 
Upvote 0
Glad to help. You could also use IFERROR in the first part of your formula to shorten it, by the way.
 
Upvote 0

Forum statistics

Threads
1,214,384
Messages
6,119,201
Members
448,874
Latest member
Lancelots

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