If If And More If's

A

alexm999

Here is my current statement:

IF(D13="MO",-ABS(B13),B13-C13)

It works fine when D13 is MO, now i have 6 more things I need to loo
up, how do I put together 7 different IF statements?

Here's what I need to look for in cell D13:
SEND
PAID
MO
MOC
DEPOSIT
DMO
CTD

Can someone help me with the formula
 
J

jeff

Hi,

You need to add a string of OR's, as in

=if(or(D13="MO",D13="PAID",D13="SEND",....)",-ABS
(B13),B13-C13)

jeff
 
F

Frank Kabel

Hi
normally using a lookup table would be the best choice. But this
depends on your expected result for each condition. Could you explain
what you want to do for each condition
 
C

Charlie

You could use an If Or statement:

=IF(OR(D13="MO",D13="PAID",D13="SEND",D13="MOC",
D13="DEPOSIT",D13="DMO",D13="CTD"),
-ABS($B$13),$B$13-$C$13)

Charlie O'Neill
 
A

Art

Maybe a "SELECT Case" would be an easier manner to manage this process
Select Case [variable]
Case "Send
instructions on what to d
Case "Paid
instructions on what to d
.......

End Select
 
A

A_Goss

Charlie said:
*You could use an If Or statement:

=IF(OR(D13="MO",D13="PAID",D13="SEND",D13="MOC",
D13="DEPOSIT",D13="DMO",D13="CTD"),
-ABS($B$13),$B$13-$C$13)
*
[/QUOTE]

I believe you could simplify this a bit by using an array.

=IF(OR(D13={"MO","PAID","SEND","MOC","DEPOSIT","DMO","CTD"}),-ABS($B$13),$B$13-$C$13)

I am no expert so many someone could provide some feedback if there i
a potential issue using this method.

Good Luck,

And
 

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