+ Reply to Thread
Results 1 to 10 of 10

Need a formula for subtracting a number only if it is greater than or equal to 5...

  1. #1
    Registered User
    Join Date
    09-17-2015
    Location
    USA
    MS-Off Ver
    Not sure
    Posts
    10

    Need a formula for subtracting a number only if it is greater than or equal to 5...

    Please help me with a formula for a spreadsheet I am creating for work purposed. I Need a formula for subtracting 2 only if it is greater than or equal to 5, subtracting 3 if it is greather than or equal to 9, and subtracting 4 if it is greater than or equal to 13

    Not sure if this is possible and I am not an excel genius


    Any and all help/feedback is appreciated. Thanks in advance!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    Hi, welcome to the forum

    I assume the "it"..."subtracting 2 only if it is greater than or equal to 5" refers to another cell? If so, then maybe something like this....
    subtracting 2 only if it is greater than or equal to 5,
    subtracting 3 if it is greather than or equal to 9, and
    subtracting 4 if it is greater than or equal to 13
    =A1-if(A1>=13,4,if(A1>=9,3,if(A1>=5,2,0)))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    Here is a shorter version...
    =A1-(2+INT((A1-5)/4))

  4. #4
    Registered User
    Join Date
    09-17-2015
    Location
    USA
    MS-Off Ver
    Not sure
    Posts
    10

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    Thanks for getting back so quick!!! I am going to try these tomorrow and will let you know if they work for my spreadsheet

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    I look forward to your feedback

  6. #6
    Registered User
    Join Date
    09-17-2015
    Location
    USA
    MS-Off Ver
    Not sure
    Posts
    10

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    Quote Originally Posted by FDibbins View Post
    Hi, welcome to the forum

    I assume the "it"..."subtracting 2 only if it is greater than or equal to 5" refers to another cell? If so, then maybe something like this....

    =A1-if(A1>=13,4,if(A1>=9,3,if(A1>=5,2,0)))
    I also forgot one parameter/condition
    I also the equation to subtract 1 if the desired cell is less than or equal to 4

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    Just change the last parameter of the IF statement....
    =A1-if(A1>=13,4,if(A1>=9,3,if(A1>=5,2,1)))

  8. #8
    Registered User
    Join Date
    09-17-2015
    Location
    USA
    MS-Off Ver
    Not sure
    Posts
    10

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    Awesome, Headed into work shortly and will be able to test it out! Thanks

  9. #9
    Registered User
    Join Date
    09-17-2015
    Location
    USA
    MS-Off Ver
    Not sure
    Posts
    10

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    It worked! thanks alot, im sure i will be needing some more help as I put the final touches on the spreadsheet and eventually make more! Thanks again

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Need a formula for subtracting a number only if it is greater than or equal to 5...

    Happy to help, look forward to assisting you further

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. [SOLVED] Outputting number of times if a number is equal to or greater than
    By mnarvaez99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2014, 10:51 AM
  2. Greater than or Equal to Formula
    By alexanderdeluna in forum Excel General
    Replies: 2
    Last Post: 02-19-2014, 09:40 PM
  3. Delete rows with cell values equal to or greater than current week number
    By Pradeep M B in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2013, 09:39 AM
  4. [SOLVED] Need HELP subtracting a number only if it is greater than another number
    By FLOWERGIRL in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-13-2012, 06:58 PM
  5. Greater Than - Less Than - Equal to.... formula help
    By dhue0715 in forum Excel General
    Replies: 7
    Last Post: 01-10-2012, 08:28 PM
  6. COUNTIF until the result is greater than or equal to a specified number.
    By JSB_2011 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-06-2012, 11:58 PM
  7. Formula for greater than or equal to
    By jsfisher in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2009, 11:50 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