+ Reply to Thread
Results 1 to 9 of 9

HLookup Formula doesn't work

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    3

    HLookup Formula doesn't work

    Hi everyone,

    I need to write a formula that gives me the value shown in the painted cell:

    =HLOOKUP(B18;B2:N15;VLOOKUP(C18;B2:N15;MATCH(D18;B3:N3;0););)

    Why does that formula don't work?

    Thank you
    Best regards
    Attached Files Attached Files
    Last edited by Screechpt; 02-14-2013 at 08:56 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: References

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Doha, State of Qatar
    MS-Off Ver
    excel 2003, 2007, 2010, 2016
    Posts
    124

    Re: References

    If possible plz upload the same in excel file.....and clear something more about your problem....!
    Regards,
    abdul

  4. #4
    Registered User
    Join Date
    02-14-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: References

    Dear Administrator,

    please check if everything is correct now.

    Thank you

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Formula doesn't work

    I have edited your title to make it more specific.

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Formula doesn't work

    You're probably better off with an INDEX/MATCH (albeit a complex one) rather than VLOOKUP/HLOOKUP. So, in E18:

    =INDEX(OFFSET($C$4:$H$15,0,MATCH(B18,$2:$2,0)-3),MATCH(C18,$B$4:$B$15,0),MATCH(D18,OFFSET($C$3:$H$3,0,MATCH(B18,$2:$2,0)-3),0))

  7. #7
    Registered User
    Join Date
    02-14-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Formula doesn't work

    Where are the references in the OFFSET Functions?

  8. #8
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: HLookup Formula doesn't work

    Which references?

    The OFFSET function requires a range ($C$4:$H$15) a number of rows to offset by (0) and a number of columns (MATCH(B18,$2:$2,0)-3))

    So C4:H15 describes the range of your first month of data and the MATCH formula offset that by a number of columns to match the month entered in B18. So it basically shifts which block of cells you're indexing based upon the month entered.

  9. #9
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: HLookup Formula doesn't work

    Hi Screechpt

    Another version. If you name two ranges, as follows.
    1/ C4:H15 and name it March
    2/ I4:N15 and name it April

    Then in E18 enter the following INDEX & MATCH
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

+ 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