Home |
Search |
Today's Posts |
#1
|
|||
|
|||
return a value based on a range
I want to return a value (a number) based on a number in anotehr cell that is
within a range of numbers using the IF function. For example: A2=$75 if B2=5, A2=$100 if B2=10, A2=$150 if B2=15. Can someone please give me the correct syntax, I am really lost! |
#2
|
|||
|
|||
=if(A2-75,5,if(a2=100,10,if(a2=150,15)))
If you have many more, you can use a vlookup table, which will be nice if your values ever change. See: http://www.officearticles.com/excel/...soft_excel.htm ************ Anne Troy www.OfficeArticles.com "Michael NYC" <Michael wrote in message ... I want to return a value (a number) based on a number in anotehr cell that is within a range of numbers using the IF function. For example: A2=$75 if B2=5, A2=$100 if B2=10, A2=$150 if B2=15. Can someone please give me the correct syntax, I am really lost! |
#3
|
|||
|
|||
Hi Michael
Try entering in A2 =IF(B2=15,150,IF(B2=10,100,IF(B2=5,75,""))) This assumes that you want nothing in cell A2 if B2 is not equal to any of those values. Or without IF statements =75*(B2=5)+25*(B2=10)+75*(B2=15) The formula will return 0 if B2 does not equal 5,10 or 15 Regards Roger Govier Michael NYC wrote: I want to return a value (a number) based on a number in anotehr cell that is within a range of numbers using the IF function. For example: A2=$75 if B2=5, A2=$100 if B2=10, A2=$150 if B2=15. Can someone please give me the correct syntax, I am really lost! |
#4
|
|||
|
|||
Correction
That should have read Or without IF statements =75*(B2=5)+25*(B2=10)+150*(B2=15) Regards Roger Govier Roger Govier wrote: Hi Michael Try entering in A2 =IF(B2=15,150,IF(B2=10,100,IF(B2=5,75,""))) This assumes that you want nothing in cell A2 if B2 is not equal to any of those values. Or without IF statements =75*(B2=5)+25*(B2=10)+75*(B2=15) The formula will return 0 if B2 does not equal 5,10 or 15 Regards Roger Govier Michael NYC wrote: I want to return a value (a number) based on a number in anotehr cell that is within a range of numbers using the IF function. For example: A2=$75 if B2=5, A2=$100 if B2=10, A2=$150 if B2=15. Can someone please give me the correct syntax, I am really lost! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I sum a range which includes the "#N/A" VLOOKUP return valu | Excel Worksheet Functions | |||
I want to return a value based on the status of a check box. If . | Excel Worksheet Functions | |||
Can you average data in 1 column based on a range of values in another? | Excel Worksheet Functions | |||
Returning a Value to a Cell Based on a Range of Uncertain Size | Excel Worksheet Functions | |||
Lookup with search range start based on position of last blank lin | Excel Worksheet Functions |