ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I set up a min and max function in the same caluclation? (https://www.excelbanter.com/excel-worksheet-functions/5569-how-do-i-set-up-min-max-function-same-caluclation.html)

wsbjr

How do I set up a min and max function in the same caluclation?
 
I want to do a state payroll calculation where the tax is calculated by
applying the tax rate to the base wage minus X percent of the base wage, with
a minimum and maximum amount. I am not sure how to write the formula with a
min and max amount.

Bob Phillips

With
A1: wage
B1: minus wage percentage
C1: tax rate
D1: minimum
E1: maximum

=MAX(MIN((A1-(A1*B1)*1)*C1,E1),D1)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"wsbjr" wrote in message
...
I want to do a state payroll calculation where the tax is calculated by
applying the tax rate to the base wage minus X percent of the base wage,

with
a minimum and maximum amount. I am not sure how to write the formula with

a
min and max amount.





All times are GMT +1. The time now is 10:19 PM.

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