# I need to update an excel formula

on
I am using the following formula:

=IF(I10="","",TEXT(I10,"M/D/YY")&" (E)")

I need to be able to also check another cell for a date value, AO10. If there is a value there it returns the value, adds a space, and then (A). If there isnt a value, it just goes through the original formula.

Ideally, it would look like this with both having values:

3/1/12 (E)
3/5/12 (A)

Value in I10 and no value AO10:

3/1/12 (E)

Value in AO10 and no value in I10:

3/5/12 (A)
Comment
Watch Question

Do more with

EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2008

Commented:
Something like this? Can you have a case when both AO10 and I10 have a value?

=IF(I10="",TEXT(AO10,"M/D/YY")&" (A)",TEXT(I10,"M/D/YY")&" (E)")

or something like that, with a line feed in between?

=IF(I10="","",TEXT(I10,"M/D/YY")&" (E)") & char(10) & if(AO10="","",TEXT(AO10,"M/D/YY")&" (A)")

Thomas

Commented:
Yes, I can have mult cases where both cells have values...
Top Expert 2008
Commented:
Then use this formula, with the cell formatted as wrap text:

=IF(I10="","",TEXT(I10,"M/D/YY")&" (E)") & char(10) & if(AO10="","",TEXT(AO10,"M/D/YY")&" (A)")
``````=IF(AND(CELL("Format",I10)="D4",AO10=""),TEXT(I10,"M/D/YY")&" (E)",IF(AND(CELL("Format",AO10)="D4",I10=""),TEXT(AO10,"M/D/YY")&" (A)",IF(AND(CELL("Format",I10)="D4",CELL("Format",AO10)="D4"),TEXT(I10,"M/D/YY")&" (E)"&"   "&TEXT(AO10,"M/D/YY")&" (A)",IF(AND(I10="",AO10=""),""))))