+ Reply to Thread
Results 1 to 3 of 3

HLOOKUP Formula that needs to ajust depending on a selection from a drop down list

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    Hull
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question HLOOKUP Formula that needs to ajust depending on a selection from a drop down list

    Hello,

    I'm fairly new to LOOKUP formulas and was wodnering if its possible for the formula to be automatically adjusted depending on a selection from a drop down list.

    I have attached the ful workbook as all the sheets are linked one way or another..

    Firstly, on the "Cover_Sheet" i have used the formula =HLOOKUP($B$1,Margin_Table!$B$1:$S$64,4,0) from B4:B30 which works fine, but when copied to columns C and D it returns "#N/A". The same thing happens when I select a different month from the drop down in B1.

    Secondly, the bottom section of the table (row 27 to 30) is returning "0" because of the issue above.

    Is it because B1 is a merged cell?

    I've scoured google and several forums to no avail! A popular subject that comes up is either nesting HLOOKUP and VLOOKUP or using INDEX-MATCH...something which exceeds my excel knowledge.


    Hope you can help,
    Tom
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: HLOOKUP Formula that needs to ajust depending on a selection from a drop down list

    Hi
    In Cell C1 on both the "Cover Sheet" and the "Margin Table" worksheets enter "'January1" (don't forget the apostrophe before the January). Your formulae will then work correctly. Once you have done that change the font colour on both worksheets to white so you don't see the entry in those cells. You can do this for each month.
    Hope this helps.
    Good luck.
    Tony

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: HLOOKUP Formula that needs to ajust depending on a selection from a drop down list

    Hi,

    You'd be better advised to use INDEX() & MATCH()

    You also need to shift your July - December table on the Margin_Table sheet to V1 so that all months are on the same rows. Then the formula on the cover sheet in B4 copied across and down is

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Yes it's failing currently because there are merged cells, (you should avoid those like the plague since they are often a real nuisance and can compromise other aspects of Excel. Use the Center across selection format instead). Putting January in C1 on the Margin Table sheet would correct it but the C4 cell would need to be changed to C1:C64 and it thereby becomes different to B4. i.e. you can't then copy B4 across.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Can a worsheet formula reference a drop down list selection?
    By 2Excel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-09-2014, 04:48 AM
  2. HLOOKUP Help. HLOOKUP links to Drop down list problems
    By finalmike in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-02-2013, 07:08 PM
  3. [SOLVED] Hide columns depending on a text selection in a drop-down list
    By hvide makelele in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2012, 04:00 PM
  4. [SOLVED] Hide rows depending on a selection in a drop-down list.
    By Kim_Mohler in forum Excel General
    Replies: 5
    Last Post: 05-02-2012, 05:40 PM
  5. Auto fill cells depending on Drop down List selection
    By Trengor in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-22-2008, 11:06 AM

Tags for this Thread

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