+ Reply to Thread
Results 1 to 6 of 6

Sum to a max value?

  1. #1
    Registered User
    Join Date
    01-29-2019
    Location
    California
    MS-Off Ver
    2016
    Posts
    3

    Sum to a max value?

    I have a template I'm using to see what wage increases would cost. One idea is to give a wage increase to everyone under a specific hourly wage and give a different raise to anyone already over that same specific wage. For a simple example, right now I have:
    Please Login or Register  to view this content.
    I have a list of many employees. I'd like to be able to look at the cost of giving all employees under $20.00 a $1.00 hourly increase, and all employees at $21.00 -$25.00 a $0.50 increase.

    What formula can I enter in cell E8 (New Wage) so it will add C8 (starting wage) and D8 (hourly increase), but only apply the $1.00 increase if the starting wage is $20 or less. And also add $.50 if the starting wage is between $21-$25?

    Thanks!!!

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Sum to a max value?

    In E8:
    Please Login or Register  to view this content.
    Full of references would be:
    Please Login or Register  to view this content.
    Like that?
    Note that this applies +0.50 to everyone at x from 20 <= x < 25, you were actually excluding everyone from 20 <= x < 21 from your example.

    This won't increase any wage that's already 25 or greater.

    Note that in edge cases (eg, 24.75 for example), this could bump people past others, who didn't get an increase because their starting wage was higher? I dunno if that matters, but it's the sort of kindof-unexpected consequence that can cause heartache in these situations.
    Last edited by ben_hensel; 01-29-2019 at 05:48 PM.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Sum to a max value?

    double-posted by accident n/m

  4. #4
    Registered User
    Join Date
    01-29-2019
    Location
    California
    MS-Off Ver
    2016
    Posts
    3

    Re: Sum to a max value?

    Thank you Ben! I will take a look at the formulas.

    Regarding the employees passing another. We would need to make it so each employee getting a raise would max out at the next threshold. So the guy at $24.75 would max out at $25. he wouldn't get the full $.50 and pass the next person currently at $25 that wouldn't get the raise. He would catch him, but not pass him.


    Could the formula include this?

  5. #5
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Sum to a max value?

    Yeah, just wrap a MIN function around it, and pull the threshold into one term, and the check in the other.

    How is your data structured? I'm kinda thinking you might be better served to be using a couple lookups on a table, rather than trying to nest it all in Boolean assessors.

    Can you post an example spreadsheet?

  6. #6
    Registered User
    Join Date
    01-29-2019
    Location
    California
    MS-Off Ver
    2016
    Posts
    3

    Re: Sum to a max value?

    I got it worked out with the help of a friend. This is what we cam up with in case anyone searches and comes across this thread for a similar question:

    In my spreadsheet I have
    Starting Wage - E3
    Wage Increase Amount for staff $21 or less - E4
    New Starting Wage for newly hired staff- E5 (E3+E4)
    Wage Increase for staff between $21-$25 - E6
    Max Wage after increases - E7


    List of drivers begin at H3 and down column H
    Starting wage for that driver starts at I3 and goes down that column
    Wage increase amount starts in J3 and goes down that column
    New wage for that driver after increase starts in K3 and goes down that column

    In the column I have the amount of the increase (column J) I have this formula - =CHOOSE(IF($I3>=$E$7,1,IF($I3<$E$5,2,3)),0,$E$4,$E$6)
    In the column I have the new wage after increase (column K), I have this formula - =CHOOSE(IF($I3>=$E$7,1,IF($I3<$E$5,2,3)),$I3,MIN($E$5,$I3+$J3),MIN($E$7,I3+J3))


    Thanks for the help Ben!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1