+ Reply to Thread
Results 1 to 13 of 13

Complicated vlookup with range values

  1. #1
    Registered User
    Join Date
    11-05-2012
    Location
    Vancouver
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Complicated vlookup with range values

    I have a table with ranges in A:A, and their corresponding values in B:B.

    The challenge is that the values in B:B have ranges of their own.

    Please see attached: Screen Shot 2012-11-05 at 2.07.01 PM.png

    I want to have a cell (let's say D1) with an input value that spits out an output value (let's say E1) corresponding to the attached table.

    For example: If my D1 value was $50, then my E1 value should be $39.50 (that's the easy part).
    The hard part: If my D1 value is $1,250 my E1 value should be ~$216.15.

    Any ideas?

    Thanks for the help.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Complicated vlookup with range values

    I can't see how you got $216.15 dollars from $1,250. Can you explain how this is calculated?
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Complicated vlookup with range values

    Do not post pictures to the forum. Post workbooks only; so that no one has to recreate your work.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    11-05-2012
    Location
    Vancouver
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: Complicated vlookup with range values

    RE: protonLeah - how do I attach a workbook?

    RE: ConneXionLost - in B8 it says: "$118.65 plus $48.75/$1000 or part thereof over $1000"
    So: $118.65 (base rate) + $48.75 (1st additional $1000) + $48.75 (2nd additional $1000) = $216.15

    Is that more clear?

    Cheers.

  5. #5
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Complicated vlookup with range values

    How to attach a sample Excel workbook:

    1. Below the "Quick Reply" thread frame, click the "Go Advanced" button.
    2. On the edit toolbar, click the "Attachments" button.
    3. In the "File Upload Manager" window, click the "Add Files" button.
    4. In the "Upload Files from your Computer" window, click the "Select Files" button.
    5. In the Windows Explorer window, locate and select your workbook, then click the "Open" button.
    6. In the "Upload Files from your Computer" window, click the "Upload Files" button.
    7. In the "File Upload Manager" window, click the "Done" button (lower right of screen).

  6. #6
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Complicated vlookup with range values

    So if the input value is $1000 the output is $118.65, but if the input value is $1001, the output is $216.15?

  7. #7
    Registered User
    Join Date
    11-05-2012
    Location
    Vancouver
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: Complicated vlookup with range values

    Here's the workbook... I hope...

    question.xlsx

  8. #8
    Registered User
    Join Date
    11-05-2012
    Location
    Vancouver
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: Complicated vlookup with range values

    Close
    If the input value is $1000, then the output value is $118.65.
    If the input value is $1001, then the output value is: $118.65 + $48.75 = $167.40
    If the input value in $1101, then the output value is: $118.65 + $48.75 + $48.75 = $216.15.

    And it looks like I made an error:
    If the input value is $1201, then the output value is: $118.65 + $48.75 + $48.75 + $48.75 = $264.90

  9. #9
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Complicated vlookup with range values

    Ah, so it is $48.75 for every $100 over $1000, not for every $1000 over $1000?

    But if true, then $10,000 would carry a charge of $4,506.15?

  10. #10
    Registered User
    Join Date
    11-05-2012
    Location
    Vancouver
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: Complicated vlookup with range values

    Ah man, I was totally confused. It is for every $1000, not for every $100. Totally my bad

    So let's try this again:
    If the input value is $1000, then the output value is $118.65.
    It the input value in $1001, then the output value is $118.65 + $48.75 = $167.40.
    If the input value is $2001, then the output value is $118.65 + $48.75 + $48.75 = $216.15

    I guess it doesn't help when I confuse things even more. Sorry.

  11. #11
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Complicated vlookup with range values

    Set up a 3 column LOOKUP table, with your amount range & it's corresponding values, then Input value in E2,

    =LOOKUP(E2,A2:B13)+INT((E2-1)/1000)*LOOKUP(E2,A2:C13)

    See the attached.

    Hope this helps.
    Attached Files Attached Files
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  12. #12
    Registered User
    Join Date
    11-05-2012
    Location
    Vancouver
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: Complicated vlookup with range values

    Quote Originally Posted by Haseeb A View Post
    Set up a 3 column LOOKUP table, with your amount range & it's corresponding values, then Input value in E2,

    =LOOKUP(E2,A2:B13)+INT((E2-1)/1000)*LOOKUP(E2,A2:C13)

    See the attached.

    Hope this helps.
    This seems to work well for the values from 0 to 10,000, but the values from 10,001 upwards don't add up for me. So close, but I think we're not quite there.

    I think it has to do with the part of the equation "INT((E2-1)/1000)", where when we get into 10s of thousands and hundreds of thousands the 1000 divider no longer works.

  13. #13
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Complicated vlookup with range values

    Try this:

    =LOOKUP(E2,A2:B13)+INT(E2/LOOKUP(E2,A2:A13))*LOOKUP(E2,A2:C13)

+ 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