+ Reply to Thread
Results 1 to 5 of 5

Sumif searching several sheets

  1. #1
    Registered User
    Join Date
    02-13-2019
    Location
    Grand Rapids, MI
    MS-Off Ver
    2016
    Posts
    5

    Question Sumif searching several sheets

    I have created the following formula, however, is there an easier way to include several sheets that may contain the lookup value?

    =SUMIF(INDIRECT("'"&INDEX(SheetNames,$A13)&"'!$B$21:$B$31"),$B129,INDIRECT("'"&INDEX(SheetNames,$A13)&"'!D21:D31"))+SUMIF(INDIRECT("'"&INDEX(SheetNames,$A14)&"'!$B$21:$B$31"),$B129,INDIRECT("'"&INDEX(SheetNames,$A14)&"'!D21:D31"))

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

    Re: Sumif searching several sheets

    Perhaps

    =SUMPRODUCT(SUMIF(INDIRECT("'"&SheetNames&"'!$B$21:$B$31"),$B129,INDIRECT("'"&SheetNames&"'!D21:D31")))

    Not sure if the syntax is correct without testing, but there is definitely a way to do it.
    Last edited by jason.b75; 02-20-2019 at 04:47 PM.

  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: Sumif searching several sheets

    It would be easier to answer definitively if you were to upload the workbook and tell us which values you are trying to sum.
    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.

  4. #4
    Registered User
    Join Date
    02-13-2019
    Location
    Grand Rapids, MI
    MS-Off Ver
    2016
    Posts
    5

    Re: Sumif searching several sheets

    Thanks. I may upload but I may also be getting close. Here I have modified the syntax as follows:

    =SUMPRODUCT(SUMIF(INDIRECT("'"&Sheets&"'!"&"$B$21:$B$31"),$B129,INDIRECT("'"&Sheets&"'!"&"D21:D31")))

    However, the result I get is #NAME? Seems like it should be a simple fix but I can't find it.

    Is it because not every sheet in the file has the same array? Most of them do but there are some that don't....

  5. #5
    Registered User
    Join Date
    02-13-2019
    Location
    Grand Rapids, MI
    MS-Off Ver
    2016
    Posts
    5

    Re: Sumif searching several sheets

    I figured it out. I needed to name a range as Sheets. Works great now!

+ 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: 2
    Last Post: 06-21-2017, 06:32 PM
  2. Searching values from different sheets (in folders), returning sheets name
    By sandroo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-10-2014, 05:57 PM
  3. I’m searching for the proper Sumif across multiple sheets formula,
    By moshef in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 11-06-2012, 01:29 PM
  4. Replies: 0
    Last Post: 08-17-2012, 02:02 PM
  5. Searching sheets
    By Johntuk in forum Excel General
    Replies: 3
    Last Post: 11-17-2007, 08:53 AM
  6. Searching among Sheets
    By danny.miranda in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-07-2007, 11:45 PM
  7. searching all sheets in a wb
    By jay d in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-21-2006, 04:56 AM

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