View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KarenF KarenF is offline
external usenet poster
 
Posts: 49
Default IF stmt with multiple results

Teethless, this doesn't solve my original problem but this solution is SO
MUCH BETTER than what I was doing and does the work of 8 columns in one.
I've been revamping my spreadsheets like crazy and haven't been able to thank
you until now.

"Teethless mama" wrote:

Try this:

=IF(K2="AB",F2-8,IF(OR(K2={"AC","AD","AK","AR","BP","BV","BW"}),F 2-7,""))



"KarenF" wrote:

Is there a way to populate more than one cell when a condition is TRUE?

I have an nested IF stmt that checks 1 cell.

=IF(K2="AB",F2-8,IF(K2="AC",F2-7,IF(K2="AD",F2-7,IF(K2="AK",F2-7,IF(K2="AR",F2-7,IF(K2="BP",F2-7,IF(K2="BV",F2-7,IF(K2="BW",F2-7,""))))))))

In English, look at K2 and, depending on the 2-digit code, subtract x from
F2. (I have many more, but am limited to 7 nested stmts.) This works quite
well, with the results going to a blank cell, M2.

The problem is this: I need to populate cells N and O, too. If K2 = AB, for
example, subtract 8 from F2, but ALSO populate the acct exec's name as
N2="last name", O2="first name". Fortunately, these are one-to-one: each
code will only ever have one acct exec and I can hard-code them.

Possible?

Karen F