# Have 2 formulas in one cell and want to choice of which

Discussion in 'Business Applications' started by excelhelp0809, May 18, 2017.

Not open for further replies.

Joined:
May 18, 2017
Messages:
3
Hi there,

I have 2 formulas in one cell and want a choice in which will populate.
EX. =DATEDIF(F12,TODAY(),"d") & "-" & DATEDIF(F12,G12,"d")
I want it to choose first formula if G12 does not have a date. REVISED: I am working on an on time delivery. I have the date the customer requested in "f" and I have the formula above in "g". "h" is the difference in days. If "F" (actual delivery date) is empty, I would like it to calculate the number of days with today's date (not really typed in cell). I would like the result to be 1 answer (either/or)

Thanks

Last edited: May 19, 2017

3. ### etaf Wayne Moderator

Joined:
Oct 2, 2003
Messages:
63,074
=if(g12="", DATEDIF(F12,TODAY(),"d"), DATEDIF(F12,TODAY(),"d") & "-" & DATEDIF(F12,G12,"d") )

Joined:
May 18, 2017
Messages:
3
That still puts 2 answers in "h" column. I am looking for it to pick 1 if "g" is blank. If "g" is blank, I want it to use today's date.

5. ### etaf Wayne Moderator

Joined:
Oct 2, 2003
Messages:
63,074
not sure i understand now

=if( g12 = "" , today() , "now what formula to put here !")

so thats how you get today() if g is blank

now you have REVISED, and mention F

now if g is not blank - what do you want

Joined:
May 18, 2017
Messages:
3
Sorry, Please see line 13. once there is a date in "H", I would like there to only be 1 number in "I". Also if we ship early, is there a way to have negative days?

File size:
44.5 KB
Views:
2

As Seen On