If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I use a range of numbers in an if statement?
I would like to use a range of numbers in an IF statement. As an example
IF("C8 =3,4,or5",25,0) which is meant to read if cell C8 is equal to the number 3, the number 4, or the number 5, then show 25, if not show 0. Is there a simple way to write this range of numbers into this IF statement? Thanks, |
#2
|
|||
|
|||
Sure, try
=IF(OR(C8={3,4,5}),25,0) Regards, Peo Sjoblom "pbeattie" wrote in message ... I would like to use a range of numbers in an IF statement. As an example IF("C8 =3,4,or5",25,0) which is meant to read if cell C8 is equal to the number 3, the number 4, or the number 5, then show 25, if not show 0. Is there a simple way to write this range of numbers into this IF statement? Thanks, |
#3
|
|||
|
|||
On Mon, 10 Oct 2005 14:16:03 -0700, "pbeattie"
wrote: I would like to use a range of numbers in an IF statement. As an example IF("C8 =3,4,or5",25,0) which is meant to read if cell C8 is equal to the number 3, the number 4, or the number 5, then show 25, if not show 0. Is there a simple way to write this range of numbers into this IF statement? Thanks, IF(OR(C8=3,C8=4,C8=5),25,0) or if the test is anything between 3 and 5 inclusive =IF(AND(C8=3,C8=5),25,0) Rgds __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I get an IF statement to pull a date range?? | Brooke Medvecky | Worksheet Functions | 9 | April 19th, 2006 08:48 PM |
How do i set up a range of numbers which prompts at a particular n | Stefan | General Discussion | 0 | October 10th, 2005 11:29 AM |
Counting if numbers fall within a specified range | KG | General Discussion | 4 | September 10th, 2005 02:30 PM |
Using COUNTIF to find numbers within a range greater than the mean | Lowkey | Worksheet Functions | 2 | May 17th, 2005 06:34 PM |
Search range of numbers for amounts that total a given | Mike Briscoe | General Discussion | 1 | July 30th, 2004 06:20 AM |