+ Reply to Thread
Results 1 to 11 of 11

Formula to calculate new cell value based on a range of possible increases

  1. #1
    Registered User
    Join Date
    07-24-2019
    Location
    ATL, GA
    MS-Off Ver
    Office 365
    Posts
    5

    Question Formula to calculate new cell value based on a range of possible increases

    Hello,

    I am sorry if my title is terrible, but here is what I am looking to do:

    I have an Excel with SKUs in one collum and prices in another, ~4000 rows total.
    I am looking to calculate new prices based on the following rules:

    If equal to or under $20, then add $2
    If over $20, but equal to or under $100, then add $5
    If over $100, but equal to or under $200, then add $10
    If over $200, but equal to or under $300, then add $15
    If over $300, then add $20

    Thanks a bunch in advance!
    Last edited by iscaspar; 07-24-2019 at 03:09 PM. Reason: Solved

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Formula to calculate new cell value based on a range of possible increases

    you have under 20 and over 20 etc, what about exactly 20 and exactly 100 etc.?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Formula to calculate new cell value based on a range of possible increases

    I would try something like this... =A2+LOOKUP(A2,{0,20,100,200,300},{2,5,10,15,20})
    but key breakpoints are important so at 20 it will jump to 5 instead of staying at 2, so you may need to change the first distribution points to 0,19,99,199,299 or maybe 0,21,101,201,301 or something like that. You may have to experiment with it.

  4. #4
    Registered User
    Join Date
    07-24-2019
    Location
    ATL, GA
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Formula to calculate new cell value based on a range of possible increases

    Quote Originally Posted by Sambo kid View Post
    you have under 20 and over 20 etc, what about exactly 20 and exactly 100 etc.?
    Here is a fix:

    If equal to or under $20, then add $2
    If over $20, but equal to or under $100, then add $5
    If over $100, but equal to or under $200, then add $10
    If over $200, but equal to or under $300, then add $15
    If over $300, then add $20

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Formula to calculate new cell value based on a range of possible increases

    then give the formula posted in post #3 a try with this adjustment to see if it works for you...
    =A2+LOOKUP(A2,{0,21,101,201,301},{2,5,10,15,20})

  6. #6
    Registered User
    Join Date
    07-24-2019
    Location
    ATL, GA
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Formula to calculate new cell value based on a range of possible increases

    It is giving me an error:Attachment 634053

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Formula to calculate new cell value based on a range of possible increases

    I cannot open your attachment, did you click go advanced (below this quick reply window) then manage attachments, then browse, upload, close and ok to upload?
    offhand the only reason I can think of an error is if you are going against text that looks like numbers instead of numbers. If you use =ISTEXT(A2) and it returns TRUE then you are going against text instead of numbers.
    if you are running up against text then you can alter the formula with this instead ... =A2+LOOKUP(A2*1,{0,21,101,201,301},{2,5,10,15,20})

  8. #8
    Registered User
    Join Date
    07-24-2019
    Location
    ATL, GA
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Formula to calculate new cell value based on a range of possible increases

    Quote Originally Posted by Sambo kid View Post
    I cannot open your attachment, did you click go advanced (below this quick reply window) then manage attachments, then browse, upload, close and ok to upload?
    offhand the only reason I can think of an error is if you are going against text that looks like numbers instead of numbers. If you use =ISTEXT(A2) and it returns TRUE then you are going against text instead of numbers.
    if you are running up against text then you can alter the formula with this instead ... =A2+LOOKUP(A2*1,{0,21,101,201,301},{2,5,10,15,20})
    I did this time. Also changed it to numbers, and =ISTEXT(B2) returns as false
    Attached Images Attached Images
    Last edited by iscaspar; 07-24-2019 at 03:00 PM.

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Formula to calculate new cell value based on a range of possible increases

    Not sure what you've got because it is difficult to diagnose a problem from a snapshot so I am attaching an example of mine for you to see.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-24-2019
    Location
    ATL, GA
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Formula to calculate new cell value based on a range of possible increases

    Quote Originally Posted by Sambo kid View Post
    Not sure what you've got because it is difficult to diagnose a problem from a snapshot so I am attaching an example of mine for you to see.
    Solved! Thank you. I had the punctuation(?) wrong in my formula!

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Formula to calculate new cell value based on a range of possible increases

    Great, glad that worked for you, AND thank you 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. Increases formula cell value by a set number down
    By fallennoctis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2019, 07:54 PM
  2. Help with writing a formula to calculate based on a range of numbers
    By hapahoale in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-25-2016, 10:24 AM
  3. Formula When Date Entered in One Cell Another Cell Increases or Decreases by 1
    By staffnu123 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-20-2015, 06:56 PM
  4. Replies: 1
    Last Post: 07-18-2013, 10:11 AM
  5. Calculate rate increases based on financial year and start dates
    By cowproduct in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-03-2012, 08:25 AM
  6. Replies: 2
    Last Post: 08-03-2012, 08:23 AM
  7. Calculate range based on cell values
    By jongleurjon in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-09-2009, 07:21 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