I have 2 Date and Time columns, that only display the date in both columns. I am trying to create a 3rd column that will display Date in Column 1 or the Date in Column 2 if it's filled in. If by chance both Date columns are filled in, then display in the calculated column the date which comes first.开发者_Python百科 Any help out there?
Assuming your date columns are titled 'Column1' and 'Column2', this should work:
=IF(AND(Column1>0,Column2>0),IF(Column1>Column2,Column2,Column1),IF(Column1>0,Column1,IF(Column2>0,Column2,"")))
Be sure to select 'Date and Time' as the data type returned by the formula.
精彩评论