Thread: What If??
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.newusers
Kane
 
Posts: n/a
Default What If??

Max... I have not tried this yet,but a question re. Condition1. The time I
indicated (5.0) could be any number of hours & minutes, depending upon the
input start (B10) and stop (C10) time. How would this affect the below AQ10
formula?

....Kane

"Max" wrote:

Admit it's a bit confusing, Kane <g. Anyway, here's one deep guess at
interpreting your set-up and what you're after

Put in AQ10:
=IF(AND(SUM(D10,K10,L10:P10)=5,NOT(AI10)),0,
IF(AND(SUM(D10,K10,L10:P10)=0,NOT(AI10)),0,1))

Test out the output in AQ10 with all the scenarios
(Lightly tested here, it seems to function as it should)

Some clarifications:
I've presumed the checkbox's link cell is still AI10, and that you want to
monitor cells: D10, K10, and L10:P10. Following through from your orig.
post, I've read your description of: "L10:P10" to mean *all* the cells
between L10 to P10, inclusive. If this is not the case and you actually
mean: L10, P10 only, then just change the part:

SUM(D10,K10,L10:P10)

to

SUM(D10,K10,L10,P10)

in AQ10's formula

And I've also disregarded your line:

1. If Start and Stop hours are entered in B10 & C10, with results in I10;


as cells B10, C10 and I10 don't seem to figure in the scenario details which
follow thereafter ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kane" wrote in message
...
MAx.. Not sure if I can use this route again, but here goes!
I now have a real problem that expands upon this scenario. I changed the
formula to read < =If(AND(SUM(L10:P10)=0,AI10),1,0) , as I was incorrect

in
stating condition 2. Condition 2 should have been < L10:P10 has no
accumulated hours( 0.0), and AB10 is checked (1), then AE10=1.

To start over might be better. We want to record chargeable "Standby" time
dependant upon the# of truck types ( dependant upon weight ) driven ( max

of
three types ). A selection is made ( one of 7 combinations ) using Control
Box,"CheckBox" (1 or 0) and supporting cell (format control, checkbox)
indicating the time ( 0.0 hours).
If there is no actual time (hours) entered , & or hours driven

distribution,
then Standard "StandBy" hours( 1=7.8 , 2=3.9 each, 3=2.6 hours) are

entered
in the max of three designated truck type columns..
I changed your formula to< =IF(AND(SUM(D10:K10:L10:P10)=0,Al10),1,0) and
it worked fine. Then, the rules changed and here are the real scenario's!
**** 4 Conditions
1. If Start and Stop hours are entered in B10 & C10, with results in I10;
If < D10:K10:L10:P10 HAS actual hours accumulated (5.0); and

<
AB10 is Control box "Checked" (1), then < AQ10=1
2. If < D10:K10:L10:P10 has NO accumulated hours (0.0) entered; and <
AB10 is control box checked (1); then < AQ10=1
3.If D10:K10:L10:P10 has accumulated hours (5.0), and < AB10 is NOT
checked (0), then < AQ10=0 .
4, If < D10:K10:L10:P10 has NO accumulated hours (0.), and < AB10 is

NOT
checked; then < AQ10=0

The time distribution determined by the number of truck types is based on
7.8 hours per day,and is selectable using a control check box.

If 1, then AM54,AM55, AM56 =7.8 hours
If 2, then AP54, AP55, AP56=7.8/2=3.9 hours
If 3, then AS54=7.8/3=2.6 hours

I hope that this makes some kind of sence!?

Should I re-post this ?