+ Reply to Thread
Results 1 to 8 of 8

Sumproduct-Sumif-Indirect Formula Problem

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    Perth
    MS-Off Ver
    Excel 10
    Posts
    15

    Sumproduct-Sumif-Indirect Formula Problem

    To the Excel Guru's on Excel Forum,

    I have been using a Sumproduct-Sumif-Indirect formula to summarise a number of worksheets and the formula has been working until the text in the lookup cell is very similar to another cell i.e Product Q*MGS2619270 & Product Q-MGS2619270. The problem is that the Q* product code sums all Q* but also Q - products.

    The formula is as follows;
    =SUMPRODUCT(SUMIF(INDIRECT("'"&$A$5:$A$7&"'!B5:B10"),$B5,INDIRECT("'"&$A$5:$A$7&"'!C5:C10")))

    I have attached an example to better illustrate the problem.

    I apologise in advance if this has been covered but as a very average excel user I have found it difficult converting other peoples problems into a solution that helps me.

    Thank you in advance for any help you can offer.

    Paul...

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Sumproduct-Sumif-Indirect Formula Problem

    instead of going for this big construction
    you can use below in c5 as your sheets are identical
    =SUM(Location_A:Location_C!C5)
    drag down and across


    Click C5 type
    =Sum(
    then select first sheet hold shift and select last sheet then Click C5 then ) and hit ok
    drag down and across
    Attached Files Attached Files
    Last edited by hemesh; 02-04-2016 at 06:30 AM.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    Perth
    MS-Off Ver
    Excel 10
    Posts
    15

    Re: Sumproduct-Sumif-Indirect Formula Problem

    Hi hemesh - Thank you for replying to my post. The reason I have not used a simple formula this that I have a product list of approx. 250 items therefore I need the formula to reference the product code as not all of the sheets will be the same.

    Paul...

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Sumproduct-Sumif-Indirect Formula Problem

    Try

    =SUMPRODUCT(SUMIF(INDIRECT("'"&$A$5:$A$7&"'!B5:B10"),LEFT($B5) & "~" &RIGHT($B5,LEN($B5)-1),INDIRECT("'"&$A$5:$A$7&"'!C5:C10")))

    the "~" negates the "*" as wildcard.


    FYI: I found the answer by "Googling" so you can often get the answer to queries like this from the Internet.
    Attached Files Attached Files
    Last edited by JohnTopley; 02-05-2016 at 05:19 AM.

  5. #5
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Sumproduct-Sumif-Indirect Formula Problem

    Array formula are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    @ John with due respect, I think totals are missing
    @PJH try below in C5 and then drag down and across, array entered

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


    Red part is rows from 5 to 10 and 2 represent column B so it becomes B5,B6,B7,B8,B9 and so on

    Second red part Column(C1) represents 3 then in next cell it become Column(D1) means 4 and so on
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Sumproduct-Sumif-Indirect Formula Problem

    Updated formula ..

    =IF(ISNUMBER(SEARCH("~*",$B5)),SUMPRODUCT(SUMIF(INDIRECT("'"&$A$5:$A$7&"'!B5:B10"),LEFT($B5)&"~"&RIGHT($B5,LEN($B5)-1),INDIRECT("'"&$A$5:$A$7&"'!C5:C10"))),SUMPRODUCT(SUMIF(INDIRECT("'"&$A$5:$A$7&"'!B5:B10"),$B5,INDIRECT("'"&$A$5:$A$7&"'!C5:C10"))))

    non-array
    Attached Files Attached Files
    Last edited by JohnTopley; 02-05-2016 at 02:08 PM.

  7. #7
    Registered User
    Join Date
    02-10-2014
    Location
    Perth
    MS-Off Ver
    Excel 10
    Posts
    15

    Re: Sumproduct-Sumif-Indirect Formula Problem

    Big thank you to both hemesh and John Topley.
    You wouldn't believe the number of hours you both have saved me.

    Thank you again.
    PJH008

  8. #8
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Sumproduct-Sumif-Indirect Formula Problem

    You are welcome PJH and thanks for feedback

+ 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. Using Sumproduct, Countif/sumif, & Indirect on outside workbook
    By mamachrissy1028 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2015, 01:12 PM
  2. [SOLVED] SUMPRODUCT, SUMIF, INDIRECT and ADDRESS
    By dma1976 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-06-2015, 10:11 AM
  3. [SOLVED] SUMPRODUCT(SUMIF(INDIRECT with Dynamic Worksheet Range
    By decipher in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2014, 05:40 AM
  4. [SOLVED] Sumif containing a Indirect problem
    By rpinxt in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-27-2014, 05:10 AM
  5. [SOLVED] Excel Novice - attempting to use SUMPRODUCT/SUMIF/INDIRECT but cell shows #REF
    By mbasi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-17-2013, 05:44 AM
  6. Replies: 0
    Last Post: 08-17-2012, 02:02 PM
  7. Sumproduct(sumif(indirect
    By jmcgallan in forum Excel General
    Replies: 6
    Last Post: 09-17-2010, 12:03 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