Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kamsa
 
Posts: n/a
Default How do I set up a conditional function in Excel

Help, I think I have done this before but cannot remember or how I did it.

For a risk log, I want a formular that will pick up from 2 cells a number of
combinations and give me the result in the third cell

ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
however if a is "L" and cell b is "M" then cell c should "M"
and if a is "L and b is "H" then c should be "M"
and if a is "M" and b is "H" then c should "H"


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(A2="L",IF(B2="L","L",IF(OR(B2="M",B2="H"),"M", "")),IF(AND(A2="M",B2="H")
,"H",""))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Kamsa" wrote in message
...
Help, I think I have done this before but cannot remember or how I did it.

For a risk log, I want a formular that will pick up from 2 cells a number

of
combinations and give me the result in the third cell

ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
however if a is "L" and cell b is "M" then cell c should "M"
and if a is "L and b is "H" then c should be "M"
and if a is "M" and b is "H" then c should "H"




  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way

=IF(AND(A1="L",B1="L@"),A1,IF(AND(A1="L",B1="M"),B 1,IF(AND(A1="L",B1="H"),"M
",IF(AND(A1="M",B1="H"),B1,""))))

assuming that if neither of the conditions are true, blank result


Regards,

Peo Sjoblom


"Kamsa" wrote in message
...
Help, I think I have done this before but cannot remember or how I did it.

For a risk log, I want a formular that will pick up from 2 cells a number

of
combinations and give me the result in the third cell

ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
however if a is "L" and cell b is "M" then cell c should "M"
and if a is "L and b is "H" then c should be "M"
and if a is "M" and b is "H" then c should "H"




  #4   Report Post  
Max
 
Posts: n/a
Default

One way ..

Assuming lookup values in cols A and B, from row1 down

Put in the formula bar for C1,
array-enter (press CTRL+SHIFT+ENTER):

=INDEX({"L";"M";"M";"H"},
MATCH(1,(A1={"L";"L";"L";"M"})*(B1={"L@";"M";"H";" H"}),0))

Copy C1 down
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Kamsa" wrote in message
...
Help, I think I have done this before but cannot remember or how I did it.

For a risk log, I want a formular that will pick up from 2 cells a number

of
combinations and give me the result in the third cell

ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
however if a is "L" and cell b is "M" then cell c should "M"
and if a is "L and b is "H" then c should be "M"
and if a is "M" and b is "H" then c should "H"




  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

I think the @ was a typo, there was no closing quote. I made the same
mistake until I saw the hyperlinking <G

Bob

"Max" wrote in message
...
One way ..

Assuming lookup values in cols A and B, from row1 down

Put in the formula bar for C1,
array-enter (press CTRL+SHIFT+ENTER):

=INDEX({"L";"M";"M";"H"},
MATCH(1,(A1={"L";"L";"L";"M"})*(B1={"L@";"M";"H";" H"}),0))

Copy C1 down
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Kamsa" wrote in message
...
Help, I think I have done this before but cannot remember or how I did

it.

For a risk log, I want a formular that will pick up from 2 cells a

number
of
combinations and give me the result in the third cell

ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
however if a is "L" and cell b is "M" then cell c should "M"
and if a is "L and b is "H" then c should be "M"
and if a is "M" and b is "H" then c should "H"








  #6   Report Post  
Max
 
Posts: n/a
Default

"Bob Phillips" wrote
I think the @ was a typo, there was no closing quote. I made the same
mistake until I saw the hyperlinking <G


Aha, you're right, I fell for it, just like Peo <g
Great razor-sharp eyesight there, Bob !
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


  #7   Report Post  
Alok
 
Posts: n/a
Default

Another way which uses an in memory table and vlookup.

=IF(ISNA(VLOOKUP(A1 &
B1,{"LL","L";"LM","M";"LH","M";"MH","H"},2,FALSE)) ,"",VLOOKUP(A1 &
B1,{"LL","L";"LM","M";"LH","M";"MH","H"},2,FALSE))

Alok

"Kamsa" wrote:

Help, I think I have done this before but cannot remember or how I did it.

For a risk log, I want a formular that will pick up from 2 cells a number of
combinations and give me the result in the third cell

ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
however if a is "L" and cell b is "M" then cell c should "M"
and if a is "L and b is "H" then c should be "M"
and if a is "M" and b is "H" then c should "H"


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
CHR() function not working in Excel 2003 Richard Jonas Excel Discussion (Misc queries) 4 February 16th 05 08:45 AM
Will the Excel WEEKNUM function become ISO 8601 compliant? Gilles Moerdijk Excel Worksheet Functions 3 February 8th 05 07:05 PM
Access Module coded converted to Excel Function Adam Excel Discussion (Misc queries) 1 December 23rd 04 02:48 PM
Does Excel 2000 have a 'datedif' function to calculate the number. Kaddy Excel Worksheet Functions 7 December 11th 04 08:53 PM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM


All times are GMT +1. The time now is 07:00 PM.

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"