+ Reply to Thread
Results 1 to 8 of 8

Sum Hlookup results from multiple tabs with dynamic range

  1. #1
    Registered User
    Join Date
    07-26-2018
    Location
    Colchester, England
    MS-Off Ver
    365
    Posts
    4

    Question Sum Hlookup results from multiple tabs with dynamic range

    Hi, I have a summary page on which I would like to use an hlookup to find the figures on multiple tabs (dependent on date), the number of tabs is changing (dynamic).

    Instead of incorporating hlookup, I have tried using =SUMPRODUCT(SUMIF(INDIRECT("'"&TabNames&"'!$C160:$Z160"),DD$7,INDIRECT("'"&TabNames&"'!$C171:$Z171"))) which I found on another thread, with no luck.

    Any ideas?

    Thanks

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Sum Hlookup results from multiple tabs with dynamic range

    Hello,

    Welcome to the forum! Could you attach a sample workbook which contains a few sheets so that we can better understand the setup of your workbook?
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Sum Hlookup results from multiple tabs with dynamic range

    Have you created a named range that refers to the tabs that the formula should look at, and called it tabnames?

    If not then you would need to do so for the formula to work correctly. It may require more work, but one thing at a time.

  4. #4
    Registered User
    Join Date
    07-26-2018
    Location
    Colchester, England
    MS-Off Ver
    365
    Posts
    4

    Re: Sum Hlookup results from multiple tabs with dynamic range

    Yes I believe I have created the named range correctly. Example attached, hopefully!

    Thanks in advance.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Sum Hlookup results from multiple tabs with dynamic range

    Not quite correctly.

    Your named range includes blank cells which cause the error in the formula. Change the named range to refer to Lists!$A$2:$A$5 and it will work correctly.

    Alternatively, if you need the range to allow for future additional sheets.

    =Lists!$A$2:INDEX(Lists!$A:$A,MATCH("zzz",Lists!$A:$A))

    Which will make the range dynamic from A2 to the last entry. ** this will fail if you add anything else other than a sheet name in Lists column A, even if there is a big gap. **

  6. #6
    Registered User
    Join Date
    07-26-2018
    Location
    Colchester, England
    MS-Off Ver
    365
    Posts
    4

    Re: Sum Hlookup results from multiple tabs with dynamic range

    Hi Jason, thanks, have edited the name to the above. Still do not have a working formula tho.

    Does it matter if that list of sheets is populated via a button using some vba?

    Thanks

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Sum Hlookup results from multiple tabs with dynamic range

    No, it should still work. I've tried both methods in your sample file, then added some more sheets and clicked the button, the formula still works.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-26-2018
    Location
    Colchester, England
    MS-Off Ver
    365
    Posts
    4

    Re: Sum Hlookup results from multiple tabs with dynamic range

    Thank-you very much.

+ 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. Replies: 10
    Last Post: 08-12-2017, 09:57 AM
  2. [SOLVED] hlookup across multiple tabs with no errors
    By SMITH.CRYSTAL in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-09-2015, 02:22 PM
  3. Vlookup / Hlookup function returning multiple text results
    By thomasp in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-22-2013, 12:32 PM
  4. Return multiple results for HLOOKUP
    By TonyFletcher in forum Excel General
    Replies: 3
    Last Post: 01-14-2011, 01:05 PM
  5. Capturing multiple HLOOKUP results in an array
    By tnfire in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-27-2009, 07:27 PM
  6. Link two dynamic workbooks with multiple tabs
    By SFDemon in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-06-2008, 10:03 PM
  7. Dynamic range name - odd results
    By Richard Buttrey in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-29-2006, 01:25 PM

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