View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Karen Smith Karen Smith is offline
external usenet poster
 
Posts: 45
Default IF AND Formula Help Needed

Sorry, i forgot to add one more condition, so use this instead:


If cell S8 = A. B. or D. & 'WorkerBe! L8 = x, than 'WorkerBe!' F8 * D3
If cell S8 = C. & 'WorkerBe! L8 = X, than 'WorkerBe!' F8 & D4
In both cases, IF('The Worker Be!'!B8="CD",0
otherwise 0

"Karen Smith" wrote:

Thanks so much David, the formula you supplied worked. I'm not that advanced
with formulas yet, so I don't always know how to simplify. Now for question
#2 (which I realized I had wrong in the the 1st note), the formula I need is:

If cell S8 = A. B. or D. than 'WorkerBe!' F8 * D3
If cell S8 = C. than 'WorkerBe!' F8 & D4
In both cases, IF('The Worker Be!'!B8="CD",0

"David Biddulph" wrote:

It's always clearer if you try to simplify your original formula and avoid
unnecessary repetition.
I think you wanted (instead of your 9 line formula 1):
='The Worker Be!'!$F8*IF(OR($S8="A.",$S8="B."),IF('The Worker
Be!'!$G8="New",$B$2,$B$3),IF($S8="C.",$B$5,IF($S8= "D.",$B$4,0))) ?
[I'm assuming that "C." gives B5 as you said in your formula, not B4 as
you've said in your most recent message.]

To answer your original question, it's easy to add the additional test, but
you haven't said what you mean by "do nothing". If you want it to return a
zero, thern try
=IF('The Worker Be!'!B8="CD",0,'The Worker
Be!'!$F8*IF(OR($S8="A.",$S8="B."),IF('The Worker
Be!'!$G8="New",$B$2,$B$3),IF($S8="C.",$B$5,IF($S8= "D.",$B$4,0))))
If you want it to return a blank, just replace the ,0, near the beginning of
the formula with ,"",
--
David Biddulph
"Karen Smith" wrote in message
...
I'm sure I've confused things with my logic and formulas, sorry. It is
inconsistant, but its valid for what I'm doing. So, to clarify:

(A. OR B.) AND (New) returns B2
(A. OR B.) AND (Update) returns B3
(C.) returns B4 regardless of New or Update
(D.) returns B5 regardless of New or Update

Also, G8 can only be New or Update. Thanks for your help.



"Bernie Deitrick" wrote:

Karen,

There is a inconsistency within your formula 1 that needs to be clarified
before we try to simplify
that formula

S8 G8 Returns

A. New B2
A. Update B3
B. New B2
B. Update B3
C. New B5
C. Update B5
D. New B4
D. Update B4

In other words:
(A. OR B.) AND (New) returns B2
(New OR Update) AND (C.) returns B5
(A. OR B.) AND (Update) returns B3
(New OR Update) AND (D.) returns B4

That may actually be what you want - but it isn't a consistent logical
structure that could be
simplified as easily if what you really want:

(A. OR B.) AND (New) returns B2
(A. OR B.) AND (Update) returns B3
(C. OR D.) AND (New) returns B4
(C. OR D.) AND (Update) returns B5

Could G8 ever be something other than New or Update?


HTH,
Bernie
MS Excel MVP


"Karen Smith" wrote in message
...
I have 2 formulas that I need to add another condition to and everytime
I try
it, it doesn't work. Both formulas also need to say: If 'The Worker
Be!'!B8=CD then do nothing with the formulas below.


Formula 1:
=IF(AND($S8="A.",'The Worker Be!'!$G8="New"),$B$2*'The Worker
Be!'!$F8,0)+IF(AND($S8="A.",'The Worker Be!'!$G8="Update"),$B$3*'The
Worker
Be!'!$F8,0)+IF(AND($S8="B.",'The Worker Be!'!$G8="New"),$B$2*'The
Worker
Be!'!$F8,0)+IF(AND($S8="B.",'The Worker Be!'!$G8="Update"),B3*'The
Worker
Be!'!$F8,0)+IF(AND($S8="C.",'The Worker Be!'!$G8="New"),$B$5*'The
Worker
Be!'!$F8,0)+IF(AND($S8="C.",'The Worker Be!'!$G8="Update"),$B$5*'The
Worker
Be!'!$F8,0)+IF(AND($S8="D.",'The Worker Be!'!$G8="New"),$B$4*'The
Worker
Be!'!$F8,0)+IF(AND($S8="D.",'The Worker Be!'!$G8="Update"),$B$4*'The
Worker
Be!'!$F8,0)

Formula 2:
=IF(AND(S8="A.",'The Worker Be!'!K8="X"),$D$3*'The Worker
Be!'!$F8,0)+IF(AND(S8="B.",'The Worker Be!'!K$8="X"),$D$3*'The Worker
Be!'!$F8,0)+IF(AND(S8="C.",'The Worker Be!'!$K8="X"),$D$4*'The Worker
Be!'!$F8,0)+IF(AND(S8="D.",'The Worker Be!'!$K8="X"),$D$3*'The Worker
Be!'!$F8,0)

Any one have any ideas? Thanks in advance for your help.