Home |
Search |
Today's Posts |
#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 __________________________ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If statement w/ rounding but not all numbers | Excel Worksheet Functions | |||
Excel charts with one standard grid and wide range of numbers | Charts and Charting in Excel | |||
Match function...random search? | Excel Worksheet Functions | |||
occurance of numbers in cell range | Excel Worksheet Functions | |||
can the negative numbers in an IF statement be in a diff color th. | Excel Worksheet Functions |