+ Reply to Thread
Results 1 to 4 of 4

Subtract IF

  1. #1
    Registered User
    Join Date
    10-12-2017
    Location
    Edmonton, AB
    MS-Off Ver
    2010
    Posts
    4

    Question Subtract IF

    I'm trying to figure out the last part of this formula.

    I have a spreadsheet that flags numbers when they reach 45 as this means the vehicle is at capacity and anything over would be excess.
    I have used this formula to find the average with the condition that the number is equal to or greater than 45

    =IFERROR(AVERAGEIF(D8:AK8,">=45"),0)

    This gives me the number I need there. However, I want to subtract 45 if the number is greater than or equal to 45 to determine what the excess capacity is.
    Can this be done in the same formula or do I need to add a separate column?

    Cheers

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Subtract IF

    Try this:

    =IFERROR(AVERAGEIF(D8:AK8,">=45")-45,0)

  3. #3
    Registered User
    Join Date
    10-12-2017
    Location
    Edmonton, AB
    MS-Off Ver
    2010
    Posts
    4

    Re: Subtract IF

    @63falcondude That worked thanks!
    Was putting the -45 in the wrong spot. Appreciate the help

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Subtract IF

    You're welcome. Thanks for the rep!

+ 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. Add and subtract in it self
    By Alexisgarci in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-29-2016, 09:01 AM
  2. Subtract value from a max sum
    By Kaas in forum Excel General
    Replies: 9
    Last Post: 08-17-2015, 08:42 AM
  3. [SOLVED] Subtract %
    By daryln in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2013, 08:33 PM
  4. If Sat subtract one day, if Sunday subtract tow days
    By Wskip49 in forum Excel General
    Replies: 3
    Last Post: 06-30-2012, 03:35 PM
  5. Replies: 1
    Last Post: 01-27-2012, 11:25 PM
  6. subtract
    By henryshuttle in forum Excel General
    Replies: 2
    Last Post: 06-26-2006, 12:10 PM
  7. [SOLVED] how to subtract one row from the other?
    By prasad in forum Excel General
    Replies: 1
    Last Post: 04-08-2005, 04:06 PM

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