Multiple functions, conditional functions

H

HeatherBelle

Here is the start of a formula I need for document tracking. The first part
works, of course, but I also need to figure out how to get the second
condition to work:

=IF(E2="","",DAYS360(E2,TODAY())), IF(H2=???????, DAYS360(H2, E2))

This is what it needs to do:
If E2 has a date in it, I need it to calculate the DAYS360 function as
above, if there's nothing, I need it to leave the cell blank (that part of
the formula is functional)
However, it will continue doing that calculation forever because "tomorrow
never comes," right?! HAHA. So, I need it to perform a different DAYS360
function if cell H2 has a date in it (the only thing that will go in it).
I hope this makes sense!
 
H

HeatherBelle

That is the same thing I have, only turned around... I need to know what to
put in place of the questions marks-- those were just used as place holders...
 
D

David Biddulph

IF(ISNUMBER(H2),...
IF(H2<>"",...

Note that Asish's formula is NOT the same as yours turned round. Your first
IF has two possible outcomes, either "" if E2="", or your DAYS360(H2, E2)
if E2<>"". That is the end of your IF. There are only two possible
outcomes. You don't ever get as far as the H2 test.

Perhaps what you intended to do was test E2, and if that is blank set the
output blank, but if E2 is not blank I guess that you might then want to
test for H2 being blank. If H2 is blank I guess that is the case where you
want DAYS360(E2,TODAY())), and if H2 is not blank, then you may want
DAYS360(H2, E2).

If my guess is correct, then you probably want the formula to look something
like
=IF(E2="","",IF(H2="",DAYS360(E2,TODAY()),DAYS360(H2, E2)))

As in so many threads here, the problem is not in finding the answer, but in
trying to guess what the question was intended to be.
 
H

HeatherBelle

Hi... just in case anyone else has a similar problem, I am posting the
solution I got from a friend of mine:

=IF(E2="","", IF(H2="", DAYS360(E2,TODAY()), DAYS360(E2,H2)))
 
D

David Biddulph

Glad to hear that it works, and that my guess as to what you were trying to
achieve was correct.
 
H

HeatherBelle

Thanks for all the input... of course, now my friend that gave me the formula
that works is actually writing some code in visual basic so that it will be a
macro instead of a formula that someone can accidentally delete! HAHA
Definitely love learning new things, though!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top