+ Reply to Thread
Results 1 to 2 of 2

if statement with result not to exceed a certain amount

  1. #1
    Registered User
    Join Date
    07-20-2016
    Location
    Eugene
    MS-Off Ver
    2010
    Posts
    1

    if statement with result not to exceed a certain amount

    I am using an if statement to do the following for accrual of sick time.

    We have the following columns:
    Hours worked
    Current period accrual based on hours worked
    Annual accrual which is limited to 40 hours
    Sick time used
    Accrual remaining after sick time used.

    If the total accrued sick time reaches 40 hours for the year, then the result of the current accrual needs to be limited so that the total accrual does not exceed 40 for the year. In the total annual accrual for the year, if the total is 40 or more, then the result we're getting back is 40. That column is working fine. In the column for the current pay period accrual, I want it to say.....if the annual total is less than 40, then take the # of hours times the accrual rate, but I want that to limit itself so that the annual total will not exceed 40. So, let's say the annual total is 38 and the current period accrual would be 3 but we want to limit it to 2 because that's what will bring us to the maximum annual accrual of 40. Is there a way to limit the current period calculation so that the annual sum won't exceed the max? In other words, we would be referencing the annual accrual column and if it's less than 40, we will go ahead and accrue the current period accrual, but we also want to test the sum of the annual accrual plus the current accrual and if it's greater than 40, we want to only accrue the amount that will bring us up to 40.

    Sounds confusing as I write this, but hopefully it makes sense!

    Thanks so much for any help!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,765

    Re: if statement with result not to exceed a certain amount

    You can use something like this:

    =MIN(accrued,40)

    so if accrued is less than 40 then that value will be returned, but if it is greater than 40 then 40 will be returned.

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Reducing the amount of If/and statements to give a particular result
    By grandar in forum Excel - New Users/Basics
    Replies: 13
    Last Post: 02-11-2014, 10:01 AM
  2. I need a picture to pop-up as the result of a cell equaling a certain amount
    By AeroTheManiac in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-17-2014, 03:07 PM
  3. Replies: 1
    Last Post: 01-25-2013, 01:58 PM
  4. moving the number when it exceed an amount
    By ccyuri in forum Excel General
    Replies: 4
    Last Post: 11-28-2012, 05:02 PM
  5. if Conditional Statement to Exceed Eight
    By ENEMALI in forum Excel General
    Replies: 2
    Last Post: 10-27-2011, 02:10 PM
  6. Replies: 1
    Last Post: 05-05-2010, 05:29 PM
  7. Formula result to not exceed number
    By Coop913 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2009, 08:51 AM
  8. Want excel to add together but not exceed total amount
    By pixiesoft in forum Excel General
    Replies: 2
    Last Post: 08-14-2008, 02:30 AM

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