ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   conditional formula (https://www.excelbanter.com/excel-worksheet-functions/198914-conditional-formula.html)

phil

conditional formula
 
i am trying to find/create a formula with the following information but have
seem to hit a wall i will try to explain

if b1 is greater than or equal to 20 than b2 is 25 or
b1 is greater than or equal to 15 but less than 20 b2 is 20 or
b1 is greater than or equal to 10 but less than 15 b2 is 15 or
b1 is greater than or equal to 2 but less than 10 b2 is 10 or
b1 is greater than or equal to 1 but less than 2 b2 is 5 or
b1 is less than 1 than b2 is 0

thanks for any ifo available

Mike H

conditional formula
 
Phil

Build a table somewhere out of the way that looks like this which in my case
is in my case is in 01 - P6 then put this formula in b2. Note if you add more
values column O must remain sorted.

=VLOOKUP(B1,O1:P6,2,1)

0 0
1 5
2 10
10 15
15 20
20 25

Mike


"phil" wrote:

i am trying to find/create a formula with the following information but have
seem to hit a wall i will try to explain

if b1 is greater than or equal to 20 than b2 is 25 or
b1 is greater than or equal to 15 but less than 20 b2 is 20 or
b1 is greater than or equal to 10 but less than 15 b2 is 15 or
b1 is greater than or equal to 2 but less than 10 b2 is 10 or
b1 is greater than or equal to 1 but less than 2 b2 is 5 or
b1 is less than 1 than b2 is 0

thanks for any ifo available


phil

conditional formula
 
thanks i finally got it to work after a little tweaking

"Mike H" wrote:

Phil

Build a table somewhere out of the way that looks like this which in my case
is in my case is in 01 - P6 then put this formula in b2. Note if you add more
values column O must remain sorted.

=VLOOKUP(B1,O1:P6,2,1)

0 0
1 5
2 10
10 15
15 20
20 25

Mike


"phil" wrote:

i am trying to find/create a formula with the following information but have
seem to hit a wall i will try to explain

if b1 is greater than or equal to 20 than b2 is 25 or
b1 is greater than or equal to 15 but less than 20 b2 is 20 or
b1 is greater than or equal to 10 but less than 15 b2 is 15 or
b1 is greater than or equal to 2 but less than 10 b2 is 10 or
b1 is greater than or equal to 1 but less than 2 b2 is 5 or
b1 is less than 1 than b2 is 0

thanks for any ifo available



All times are GMT +1. The time now is 10:43 AM.

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