View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Nested Formula - HELP

I don't know what you're trying to achieve, but your syntax looks wrong.

Your IF conditions asks whether AND($I$5="",$J$5="") is true.
If it is true, then your result of your formula is the logical result of the
OR function.
The first argument of the OR function is AND($G$5=K3,$G$5<=K2)
The second argument of the OR function is (AND($H$5=K3,$H$5<=K2),1,"")
which doesn't make sense as it doesn't say how you're trying to combine the
1 and the "" with the result of the AND() function.
You've then closed your IF function without giving a result for the the
false condition, and the rest of the formula after that isn't valid because
you've already completed the IF function.

I guess you may have intended some later IF functions but you haven't
included them?

Two things you need to look at:
1 You need to ensure that you've got valid syntax for each function in your
formula.
2 You need to decide on the truth table for what you want as the result for
the various combinations of your inputs.
--
David Biddulph

"Gayla" wrote in message
...
I am getting closer.
I changed it some because it was putting a 1 in every column from the
first
time a date constraint was met throughout the rest of the year. I figured
out why, there should be a nested AND after the OR statement for the first
two arguments, then the OR should pertain to the two nested AND
statements.
I also added a infront of the equal for the first argument in each set.
Please tell me what I am doing wrong.

=IF(AND($I$5="",$J$5=""),OR(AND($G$5=K3,$G$5<=K2) ,(AND($H$5=K3,$H$5<=K2),1,""))),OR(AND($I$5=K3,$ I$5<=K2),(AND($J$5=K3,$J$5<=K2),1,""))))

Thanks.
"David Biddulph" wrote:

=IF(AND($I$5="",$J$5=""),IF(OR($G$5=K3,$G$5<=K2),1 ,IF(OR($H$5=K3,$H$5<=K2),1,"")),IF(OR($I$5=T3,$I$5 <=K2),1,IF(OR($J$5=K3,$J$5<=K2),1,"")))
or simplify it to
=IF(AND($I$5="",$J$5=""),IF(OR($G$5=K3,$G$5<=K2,$H $5=K3,$H$5<=K2),1,""),IF(OR($I$5=T3,$I$5<=K2,$J$5= K3,$J$5<=K2),1,""))
--
David Biddulph

"Gayla" wrote in message
...
Here are the formulas I am trying to put together into one formula but
cannot
seem to get it right.

IF((AND($I$5="",$J$5="") IF TRUE THEN DO THE FOLLOWING CALCULATION:

SEE IF ONE OF THE FOLLOWING APPLY:
OR($G$5=K3,$G$5<=K2),1,""), OR($H$5=K3,$H$5<=K2),1,"")

IF FALSE DO THE FOLLOWING:

SEE IF ONE OF THE FOLLOWING APPLY:
OR($I$5=T3,$I$5<=K2),1,""), OR($J$5=K3,$J$5<=K2),1,"")

Any help will be appreciated.