I have a table in excel with non-standard dates written in four general formats (first column), and would like to convert each to a standard excel date format (2nd column).
Early 2022 should convert to 01/14/2022 YE 2022 should convert to 12/01/2022 2Q 2022 should convert to 05/01/2022 2H 2023 should convert to 09/01/2023
Ideally, I would like to use the custom format table and just add these 4 rules but a formula addressing each of the 4 scenarios would also suffice.
Non-Standard Dates | Converted Dates |
---|---|
Early 2022 | 01/14/2022 |
YE 2022 | 12/01/2022 |
2Q 2022 | 05/01/2022 |
2H 2023 | 09/01/2023 |
Most likely, nested IF statements will be required that check for the words "Early", "YE", "2Q" and "2H" will be required, followed by amending of last 4 digits.
I've only figured out how to check for one word, but the IF statements need to be nested. =IF(A2="Early", "01/14/", "" ) works, but of course I need to replace the last portion ("") with a new IF statement to look for the next phrase ("YE") and so forth. I also need to amend the last 4 digits.