ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Return a value that falls within a defined range (https://www.excelbanter.com/excel-discussion-misc-queries/101199-return-value-falls-within-defined-range.html)

Suzieq

Return a value that falls within a defined range
 
I am sure this is simple but what formula can I use to return a value within
a range of numbers. Here is specifically what I am trying to do: If a cell
contains the number 1 through 5 the value returned is 1.00, if the same cell
contains the value 6 through 10 the value returned is .875 etc.

CLR

Return a value that falls within a defined range
 
=IF(AND(A10,A1<=5),1,IF(AND(A15,A1<=10),0.875,"" ))

Vaya con Dios,
Chuck, CABGx3




"Suzieq" wrote:

I am sure this is simple but what formula can I use to return a value within
a range of numbers. Here is specifically what I am trying to do: If a cell
contains the number 1 through 5 the value returned is 1.00, if the same cell
contains the value 6 through 10 the value returned is .875 etc.


Alan

Return a value that falls within a defined range
 

Suzieq wrote:
I am sure this is simple but what formula can I use to return a value within
a range of numbers. Here is specifically what I am trying to do: If a cell
contains the number 1 through 5 the value returned is 1.00, if the same cell
contains the value 6 through 10 the value returned is .875 etc.


Another solution is to use a vlookup table:

1 1.00
6 .875
11 etc
etc.

Be sure to set the 4th parameter of the vlookup function as TRUE.



All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com