Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multiple conditions and IF Statements
Hello--I am trying to write an IF statement with more than 2
conditions. Ultimately, I would like to have a formula that calculates the following: IF #1 -- #2 is 10, return "Yellow," Otherwise, return "Green." AND/ OR If #1 -- #2 30, Red, Otherwise return yellow or green (based on thresholds above). Is this possible? This is what I have so far: =IF('Small Business Card Data'!C3-'Small Business Card Data'! B310,"Yellow","Green") Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multiple conditions and IF Statements
Try it this way:
=IF('Small Business Card Data'!C3-'Small Business Card Data'! B330,"Red",IF('Small Business Card Data'!C3-'Small Business Card Data'!B310,"Yellow","Green")) Hope this helps. Pete On Jan 18, 3:54*pm, wrote: Hello--I am trying to write an IF statement with more than 2 conditions. *Ultimately, I would like to have a formula that calculates the following: IF #1 -- #2 is 10, return "Yellow," Otherwise, return "Green." AND/ OR If #1 -- #2 30, Red, Otherwise return yellow or green (based on thresholds above). *Is this possible? This is what I have so far: =IF('Small Business Card Data'!C3-'Small Business Card Data'! B310,"Yellow","Green") Thanks! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multiple conditions and IF Statements
If you need more than a few nested if statements, I like to use
vlookup. The lookup table might look like this (hide it anywhere in the workbook): No. Color 1 Red 2 Red 3 Red 4 Red 5 Yellow 6 Yellow 7 Yellow 8 Yellow 9 Green 10 Green Then your formula (in A2 for instance) could look something like this: =vlookup(A1,mycolortable,2,false). If the number in A1 = 10, then the formula returns "green". If the number is 4, then it returns "Red". This method is far easier to write and debug if you have 3 or more nested if statements. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multiple conditions and IF Statements
On 18 Jan, 11:44, Pete_UK wrote:
Try it this way: =IF('Small Business Card Data'!C3-'Small Business Card Data'! B330,"Red",IF('Small Business Card Data'!C3-'Small Business Card Data'!B310,"Yellow","Green")) Hope this helps. Pete On Jan 18, 3:54*pm, wrote: Hello--I am trying to write an IF statement with more than 2 conditions. *Ultimately, I would like to have a formula that calculates the following: IF #1 -- #2 is 10, return "Yellow," Otherwise, return "Green." AND/ OR If #1 -- #2 30, Red, Otherwise return yellow or green (based on thresholds above). *Is this possible? This is what I have so far: =IF('Small Business Card Data'!C3-'Small Business Card Data'! B310,"Yellow","Green") Thanks!- Hide quoted text - - Show quoted text - This is exactly what I was looking for--thanks so much for your help. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multiple conditions and IF Statements
You're welcome - thanks for feeding back.
Pete On Jan 18, 4:55*pm, wrote: On 18 Jan, 11:44, Pete_UK wrote: Try it this way: =IF('Small Business Card Data'!C3-'Small Business Card Data'! B330,"Red",IF('Small Business Card Data'!C3-'Small Business Card Data'!B310,"Yellow","Green")) Hope this helps. Pete On Jan 18, 3:54*pm, wrote: Hello--I am trying to write an IF statement with more than 2 conditions. *Ultimately, I would like to have a formula that calculates the following: IF #1 -- #2 is 10, return "Yellow," Otherwise, return "Green." AND/ OR If #1 -- #2 30, Red, Otherwise return yellow or green (based on thresholds above). *Is this possible? This is what I have so far: =IF('Small Business Card Data'!C3-'Small Business Card Data'! B310,"Yellow","Green") Thanks!- Hide quoted text - - Show quoted text - This is exactly what I was looking for--thanks so much for your help.- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumif, And Statements - multiple conditions | Excel Worksheet Functions | |||
Using SUMIF/IF statements for multiple conditions | Excel Worksheet Functions | |||
Multiple if statements with multiple conditions | Excel Discussion (Misc queries) | |||
IF statements and conditions | Excel Worksheet Functions | |||
Sum if statements with conditions | Excel Worksheet Functions |