+ Reply to Thread
Results 1 to 10 of 10

Having trouble with Vlookup/Hlookup

  1. #1
    Registered User
    Join Date
    09-14-2013
    Location
    ohio
    MS-Off Ver
    Excel 2010
    Posts
    12

    Having trouble with Vlookup/Hlookup

    I'm supposed to use a VLOOKUP function to show the cost of yardwork on a small, medium, large and commercial sized lawns. There is a table in another sheet that shows these costs. I can't get the VLOOKUP to work, I got it to work with a nested IF function but I'm supposed to use VLOOKUP. When I try to show the total cost with discounts, using the HLOOKUP from another table, I only get "VALUE" errors.

    Thanks!
    Attached Files Attached Files

  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,939

    Re: Having trouble with Vlookup/Hlookup

    Try this...
    =INDEX('Pricing Guide-Updated April 7'!$D$3:$G$7,MATCH('Customers-April 7-11'!E4,'Pricing Guide-Updated April 7'!$D$3:$D$7,0),MATCH(H4,'Pricing Guide-Updated April 7'!$D$3:$G$3,1))
    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
    Registered User
    Join Date
    09-14-2013
    Location
    ohio
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Having trouble with Vlookup/Hlookup

    Is there no way to do it with VLOOKUP?

  4. #4
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111

    Re: Having trouble with Vlookup/Hlookup

    Yes there is a way, but FDibbins as given you an alternative to the Hlookup to return a discount value.

    As for the vlookup try this...

    =VLOOKUP(E4,'Pricing Guide-Updated April 7'!$A$4:$B$7,2,FALSE)
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  5. #5
    Registered User
    Join Date
    09-14-2013
    Location
    ohio
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Having trouble with Vlookup/Hlookup

    I know there's different ways to do formulas, but unfortunately I have to use the formulas that we are learning that particular week

    Why do I need the "FALSE" at the end? I thought it was optional?

  6. #6
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111

    Re: Having trouble with Vlookup/Hlookup

    [range_lookup]: Do you want an exact match? Is an approximate match okay?
    If you use TRUE as the last argument, or omit the last argument, an approximate match can be returned. This example has FALSE as the last argument, so if the product code is not found, the result will be #N/A. (Note: Excel is rather forgiving, and will accept 0 instead of FALSE, and 1 instead of TRUE.)

    Source of explanation

  7. #7
    Registered User
    Join Date
    09-14-2013
    Location
    ohio
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Having trouble with Vlookup/Hlookup

    Thanks ratcat. So If I want to use HLOOKUP to find the Total with Discount, do I need to use a combination of HLOOKUP and INDEX/MATCH?

    I'm assuming I'll use HLOOKUP to determine the discount percent and then multiply that by the subtotal?

  8. #8
    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,939

    Re: Having trouble with Vlookup/Hlookup

    If this is homework, it is against forum policy to do your homework for you We can advise on what you have already tried.

    To answer your question regarding the FALSE, yes it is optional, but its good practice to specify whether the data is sorted (TRUE) or not (FALSE) - FALSE will look for an exact match, TRUE will return the 1st value smaller than what you are searching for, if no exact match is found

  9. #9
    Registered User
    Join Date
    09-14-2013
    Location
    ohio
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Having trouble with Vlookup/Hlookup

    Dibbins, when I use HLOOKUP, and when I tried your INDEX/MATCH function for the Total with Discounts, I get values of 0$, $.02, $.03, which doesn't make any sense because shouldn't it return the % value of the discount, and then I just add a *(H4) <---(Subtotal) to get the total final price?

  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,939

    Re: Having trouble with Vlookup/Hlookup

    That just means you need to format the answer to % - or apply that value to the amount owed

+ 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. Vlookup / hlookup
    By Coconutwei in forum Excel General
    Replies: 4
    Last Post: 07-01-2011, 04:06 AM
  2. VLookup/HLookup or Both.. Even Possible?
    By mardon in forum Excel General
    Replies: 10
    Last Post: 05-18-2011, 11:53 AM
  3. [SOLVED] HLOOKUP, VLOOKUP
    By heydean in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2006, 04:56 PM
  4. can i use vlookup and hlookup together
    By Tinman09 in forum Excel General
    Replies: 1
    Last Post: 11-07-2005, 05:55 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