问题
I need help with a nested IF and ISBLANK formula. Here is the scenario:
There are three columns: A, B and C. All three are dates.
I want to retrieve the value of column A in column D (direct value). if Column A is blank, retrieve Column B value, if Column B is also blank retrieve Column C value.
Addition to this if column A has year 2015/2016
consider that cell as Blank and retrieve Column B/C.
How do I tackle this scenario?
回答1:
For your first bit:
=IF(ISBLANK(A1),IF(ISBLANK(B1),C1,B1),A1)
Then to add in the 2015/2016 check on A. This:
=IF(OR(ISBLANK(A3),AND(A3>=DATE(2015,1,1),A3<=DATE(2016,12,31))),IF(ISBLANK(B3),C3,B3),A3)
回答2:
A different interpretation:
=1*TRIM(LEFT(IF(A1="2015/2016","",A1)&B1&C1,5))
来源:https://stackoverflow.com/questions/33923346/nested-if-and-isblank-formula