+ Reply to Thread
Results 1 to 8 of 8

Vlookup Help

Hybrid View

  1. #1
    Registered User
    Join Date
    07-20-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    63

    Talking Vlookup Help

    I'm new to Vlookup's so i need a bit of help, to be honest i'm not sure i'm using the correct function.

    I have a spreadsheet(attached, not the full sheet). I have a list of 4 products, then quantities, then this is where i've been trying to use Vlookup. This column will change depending on the previous column.

    The problem is as you will see from my sheet i have a range of figures i.e 1 -29,999 =10% , 30,000 -59,999 = 6.5% each with there own %.

    So if i have 25,000 in C column D should change to 10%.

    Can i use Vlookup for this.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Vlookup Help

    yes, reorder your charge bands (lowest first) and delete the hyphen and the second number, so 30,000-59,999 becomes 30000

    That should do it.

    HTH

  3. #3
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Vlookup Help

    Take a look at attached file

    I used this function here

    =IF(ISERROR(INDEX($L$32:$L$37,MATCH(TRUE,$C7<=$K$32:$K$37,0))),INDEX($L$32:$L$37,MATCH(MAX($K$32:$K$37),$K$32:$K$37,0)),INDEX($L$32:$L$37,MATCH(TRUE,$C7<=$K$32:$K$37,0)))
    Confirmed with control + shift + enter

    Maybe it is too long but it's working,,,
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  4. #4
    Registered User
    Join Date
    07-20-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Vlookup Help

    Thanks

    This works but would it be possible for someone to explain this to me.

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Vlookup Help

    I'm not sure why the altnerative was proposed, but my suggestion is distinctly more understandable, robust and futureproof.

    CC

  6. #6
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Vlookup Help

    Array formulas are best avoided whenever other solutions are available.
    Go with the first solution and follow the K.I.S.S. principle.

    No slight to Contaminated - good job.
    Arrays are just too resource hungry to be used much.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup Help

    i agree but i'd go for
    =LOOKUP(C7,{0,1,30000,60000,150000,400000,700000},{0,0.1,0.065,0.04,0.0212,0.0225,0.0185})
    but aren't the 2.25 and 2.12 reversed?
    Last edited by martindwilson; 08-03-2009 at 12:06 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Vlookup Help

    That's neat and concise, but a pain in the backside when the charge rates change.

    I'd recommend keeping it as it is with a separate rates table and retaining the original Vlookup (I would name the rates table as a named range). It's less pretty but it's easier to look after.

    CC

+ 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