ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Trouble writing an excel formula... (https://www.excelbanter.com/excel-worksheet-functions/8101-trouble-writing-excel-formula.html)

Stumped by If Thens....

Trouble writing an excel formula...
 
Does anyone know the formula for "If between x & y, then z"? Someone's hourly
wage will be dependent upon three different ranges I will bill their time out
to clients.

If under X, then the hourly rate is $30
If between X and Y, then the hourly rate is $33
If over Y, then the hourly rate is $35

JE McGimpsey

One way:

=IF(A1<X,30,IF(A1<=Y, 33, 35))

In article ,
"Stumped by If Thens...." <Stumped by If
wrote:

Does anyone know the formula for "If between x & y, then z"? Someone's hourly
wage will be dependent upon three different ranges I will bill their time out
to clients.

If under X, then the hourly rate is $30
If between X and Y, then the hourly rate is $33
If over Y, then the hourly rate is $35


Arvi Laanemets

Hi

With value to process in cell A1:
=30+3*(A1=X)+2*(A1Y)
Unlike using nested IF, you aren't limited with 7 nesting levels. And
probably it will work faster too.


Arvi Laanemets


"Stumped by If Thens...." <Stumped by If
wrote in message
...
Does anyone know the formula for "If between x & y, then z"? Someone's

hourly
wage will be dependent upon three different ranges I will bill their time

out
to clients.

If under X, then the hourly rate is $30
If between X and Y, then the hourly rate is $33
If over Y, then the hourly rate is $35




JE McGimpsey

Long before 7 nesting levels became an issue, I'd think one would want
to use a lookup. The simpler maintenance in most cases would trump
faster calculation...

In article ,
"Arvi Laanemets" wrote:

With value to process in cell A1:
=30+3*(A1=X)+2*(A1Y)
Unlike using nested IF, you aren't limited with 7 nesting levels. And
probably it will work faster too.



All times are GMT +1. The time now is 07:13 AM.

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