Need to combine two if statements

Copper Contributor

Lol I have tried for hours to figure this out, I need to combine this two if statements 
=if(E3="n",B3)

=if(E3="y",F3)

 

I am sure this is completely simple and will kick myself when someone gives me the answer, thank you!

3 Replies

@tinksmama 

like

=IF(E3="n", B3, IF(E3="y", F3, ""))
YES!!!!!
thank you!

One more? I have a cell that calculates how many days from when an invoice was sent to today, but since this cell is in regards to a secondary invoice there isn't always a secondary invoice, so no date, when there's no date is populates with 43671

@tinksmama , you are welcome.

 

Dates in Excel are actually sequential integer numbers starting from 1 which is equivalent of 01 Jan 1900 (for Windows).  Thus 43671 that's the sequential number of the date starting from above date. If you apply Date format to that cell it will show 25 July 2019.

You may check if there is no date entered then return invoice age as zero, e.g.

=IF( LEN(A1)=0, 0, TODAY()-A1)

or return empty string "" instead of zero.