I’m trying to correct a date value with a double IF condition. Where a date (TEXT or GENERAL) has only the year, and the month and day (either or both) are zero. I want to convert the month to 01 and the day to 01.
For example
19540000 to be changed to 19540101
or 19541200 to be changed to 19541201.
If the date is normal, then leave it as it is
19450815 copies as 19450815
See Calc example.
Either of the single IF statements works, but how do I put them together in one statement?
=IF(RIGHT(A2,2)=“00”, LEFT(A2,LEN(A2)-2) &“01”,A2), IF(RIGHT(A2,4)=“0000”, LEFT(A2,LEN(A2)-4) &“0101”,A2)