#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default IF Statements

I have the following IF Statements. Can some one please help me add them all
together or enlighten me to a simpler way.

I basically want to say...
If A=High and B=+Major put YY,
if B=+moderate put YY,
if B=+minor put Y,
if B=negligible put O,
if B=-minor put N,
if B=-moderate put NN and
if B=-major put NN.....
BUT IF A=Medium and B=+major put YY,
if B=+moderate put Y,
if B=+minor put O,
if B=negligible put O,
if B=-minor put O,
if B=-moderate put N and
if B=-major put NN.....
BUT IF A=Low and B=+major put Y,
if B=+moderate put O,
if B=+minor put O,
if B=negligible put O,
if B=-minor put O,
if B=-moderate put O and
if B=-major put N

=IF($B$3="High",IF(B$9="+Major","YY",IF(B$9="+Mode rate","YY",IF(B$9="+Minor","Y",IF(B$9="Negligible" ,"0",IF(B$9="-
Minor","N",IF(B$9="- Moderate","NN",IF(B$9="- Major","NN","0"))))))))

=IF($B$3="Medium",IF(B$9="+Major","YY",IF(B$9="+Mo derate","Y",IF(B$9="+Minor","O",IF(B$9="Negligible ","0",IF(B$9="-
Minor","O",IF(B$9="- Moderate","N",IF(B$9="- Major","NN","0"))))))))

=IF($B$3="Low",IF(B$9="+Major","Y",IF(B$9="+Modera te","O",IF(B$9="+Minor","O",IF(B$9="Negligible","0 ",IF(B$9="-
Minor","O",IF(B$9="- Moderate","O",IF(B$9="- Major","N","0"))))))))

Appreciate the help in advance
Rebecca

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,173
Default IF Statements

Rebecca

Realistically you have a couple of choices

1) Write a UDF (User defined function). This is not tricky, but you will
need to know VBA
2) Set up a table on another sheet to lookup on.

Taking the second route and presuming the table takes up the range A1:B21 on
a sheet called sheet2, enter into the range A1:A21 in the new table, both
criteria rolled into one, e.g

High+Major
High+moderate
.........

Alongside this in B1:B21 enter the result, e.g

YY
YY
Y
.....

Now for your formula alongside the current data (Say in C1)

=VLOOKUP(A1&B1,Sheet2!$A$1:$B$21,2,FALSE)

This concatenates the two parts of the criteria, looks them up in the new
table on Sheet2 and then returns the result it finds in the second column of
the new table alongside the match

Hope that makes sense

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Rebecca" wrote in message
...
I have the following IF Statements. Can some one please help me add them
all
together or enlighten me to a simpler way.

I basically want to say...
If A=High and B=+Major put YY,
if B=+moderate put YY,
if B=+minor put Y,
if B=negligible put O,
if B=-minor put N,
if B=-moderate put NN and
if B=-major put NN.....
BUT IF A=Medium and B=+major put YY,
if B=+moderate put Y,
if B=+minor put O,
if B=negligible put O,
if B=-minor put O,
if B=-moderate put N and
if B=-major put NN.....
BUT IF A=Low and B=+major put Y,
if B=+moderate put O,
if B=+minor put O,
if B=negligible put O,
if B=-minor put O,
if B=-moderate put O and
if B=-major put N

=IF($B$3="High",IF(B$9="+Major","YY",IF(B$9="+Mode rate","YY",IF(B$9="+Minor","Y",IF(B$9="Negligible" ,"0",IF(B$9="-
Minor","N",IF(B$9="- Moderate","NN",IF(B$9="- Major","NN","0"))))))))

=IF($B$3="Medium",IF(B$9="+Major","YY",IF(B$9="+Mo derate","Y",IF(B$9="+Minor","O",IF(B$9="Negligible ","0",IF(B$9="-
Minor","O",IF(B$9="- Moderate","N",IF(B$9="- Major","NN","0"))))))))

=IF($B$3="Low",IF(B$9="+Major","Y",IF(B$9="+Modera te","O",IF(B$9="+Minor","O",IF(B$9="Negligible","0 ",IF(B$9="-
Minor","O",IF(B$9="- Moderate","O",IF(B$9="- Major","N","0"))))))))

Appreciate the help in advance
Rebecca


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple IF statements or a better method ? Bob Moore Excel Discussion (Misc queries) 4 November 25th 06 01:20 AM
2 IF Statements not mutually exclusive Bev Excel Discussion (Misc queries) 2 August 24th 06 05:23 AM
UDFunctions and nested If-the-else statements JDB Excel Worksheet Functions 1 January 25th 06 03:29 PM
Linking two IF statements together trixma Excel Discussion (Misc queries) 2 September 29th 05 06:07 AM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"