+ Reply to Thread
Results 1 to 10 of 10

Using sumproduct when array contains some cells with text

  1. #1
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Using sumproduct when array contains some cells with text

    Hi guys,

    Please see attached work book

    Sheet 1 contains my sumproduct formula which is error-ing due to the array containing some cells with text.
    Sheet 2 contains the data that I am trying to sum along with the criteria arrays

    The issue is that my data is broken into tables that are presented and subtotalled monthly so it contains cells with text below each month and also the text in the headers of the next months tables etc etc.

    I am trying to do a sumproduct for the entire years data with the following formula

    SUMPRODUCT((Sheet2!D3:P31)*(Sheet2!D1:P1=Sheet1!B1)*(Sheet2!A3:A31=Sheet1!A2))

    Note - The array 'Sheet2!D3:P31' spans across headings and other cells containing text

    So I know this formula will not work but I am hoping there is away to ignore the cells with text and still sum the numerical data as I still need to present the data in a month by month table.

    Thanks, Mike
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: Using sumproduct when array contains some cells with text

    Could you please let us know what your expected outcomes are for the results table on sheet 1?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Re: Using sumproduct when array contains some cells with text

    it would be 1000.

  4. #4
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Re: Using sumproduct when array contains some cells with text

    The main thing I want is to access the array across Dec-16 to Dec-17 as opposed to creating a separate sumproduct formula for each month. Maybe I shouldn't be using sumproduct at all, I just need to be able to access that entire data set even though it contains some cells with text in it. Note - Obviously the workbook I uploaded is a mock up of the real workbook and only shows Dec-17 to Jan-17.

  5. #5
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Re: Using sumproduct when array contains some cells with text

    Sorry meant to say Dec-16 to Jan-17

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: Using sumproduct when array contains some cells with text

    Quote Originally Posted by Manwithaplan View Post
    it would be 1000.
    Explain why, please. Where are you getting the 1000 from (I know it's from the other sheet, but where exactly)? If that is B2, what about all the other cells in the results table?

  7. #7
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Re: Using sumproduct when array contains some cells with text

    From D3. Sorry i thought that would be apparent when you looked at the formula. I have uploaded another version showing the criteria range for the month and the criteria range for the type and the area in which the formula would be summing. Hopefully this is enough for you.

    Mike
    Attached Files Attached Files

  8. #8
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Using sumproduct when array contains some cells with text

    Try this array formula (must be enter with CTRL+SHIFT+ENTER)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See the file
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Re: Using sumproduct when array contains some cells with text

    Nice one, so all I needed to use is iferror? I always thought your array couldn't contain text and numerical values??

  10. #10
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Using sumproduct when array contains some cells with text

    CAN TRY LIKE THIS WITHOUT Ctrl+Shift+Enter IN THIS PARTICULAR PROBLEM, IT WILL NOT WORK ALL THE CASES
    Please Login or Register  to view this content.
    try this and copy towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

+ 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. SUMPRODUCT array formula doesn't recognize Array 5
    By trstew in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-08-2016, 05:01 PM
  2. [SOLVED] Exclude cells containing text from SUMPRODUCT function
    By Uomoviso in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-17-2016, 09:20 AM
  3. sumproduct of a number array and a text array starting with 2 numbers
    By Bishonen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-21-2013, 11:48 AM
  4. Array/Sumproduct issue. Trying to "count" text.
    By purepower in forum Excel General
    Replies: 2
    Last Post: 10-24-2012, 01:44 PM
  5. Sumproduct in varibale text array
    By Ada01 in forum Excel General
    Replies: 2
    Last Post: 03-22-2012, 05:13 PM
  6. Sumproduct or array formula for counting criteria of sum of cells
    By jasoncw in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-09-2007, 03:09 PM
  7. Replies: 1
    Last Post: 04-21-2006, 12:35 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