+ Reply to Thread
Results 1 to 4 of 4

Combining TEXT() with SUMPRODUCT()

  1. #1
    Registered User
    Join Date
    11-13-2010
    Location
    Wilsonville, OR
    MS-Off Ver
    Excel 2007
    Posts
    5

    Combining TEXT() with SUMPRODUCT()

    Hi all, I have a range of numbers I'm summing via sumproduct such that B1:B10 is the values to sum, A1:10 is my range of 1's and 0's. I'm also trying to wrap a TEXT() function around the whole thing and dynamically change the formatting of the result, based on some logic in A11. A11 could equal #,##0 or $,##0.00 - depending on user selection (to round or not).

    The formula is TEXT(SUMPRODUCT($A1:$A10,B1:B10),$A$11), but the result is always 0. If I pull the TEXT() piece out, the sumproduct works as expected, and if I wrap the TEXT() formula around one of the values in my B1:B10 range, the number formatting works as expected. It seems that Excel doesn't like something about combining TEXT and SUMPRODUCT. Similarly, I tried simplifying the SUMPRODUCT to just SUM (and pulled out the A1:A10 validation), and it still resulted in 0.

    Any luck getting text and sumproduct to play nice together?

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Combining TEXT() with SUMPRODUCT()

    sumproduct will work with text but it depends on how you are using it...
    for example this... =SUMPRODUCT(--(TEXT($A$1926:$A$1944,"yyyy")=C1926)) worked for me where I had dates (such as 7/12/2015) in col A and also a year (formatted as text) in cell C1926.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

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

    Re: Combining TEXT() with SUMPRODUCT()

    If sumproduct works without the text function then why not just use that and apply conditional formatting to the result?

  4. #4
    Registered User
    Join Date
    11-13-2010
    Location
    Wilsonville, OR
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Combining TEXT() with SUMPRODUCT()

    jason.b- I'm using third party software that opens up a managed instance of Excel. The TPS doesn't play nicely with CF.

    All- Sambokid alluded to the answer. I was also wrapping the text() around the values in my B1:B10, so the sum or sumproduct functions didn't know how to perform math on (what I had turned into) non-numeric cells. Thanks for the replies, all.

+ 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. [SOLVED] Need help combining Countifs with sumproduct
    By kartikoli in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 6
    Last Post: 02-13-2019, 01:50 AM
  2. Need help combining Countifs with sumproduct
    By kartikoli in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-09-2019, 10:09 AM
  3. Combining Sumproduct with countif
    By itobon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-22-2016, 11:53 AM
  4. Sumproduct combining a total
    By cdhamo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-30-2015, 08:57 PM
  5. [SOLVED] Combining Sumproduct with indirect
    By pauldaddyadams in forum Excel General
    Replies: 13
    Last Post: 04-29-2015, 07:44 AM
  6. [SOLVED] Combining SUMPRODUCT and MAX
    By DeZeeuw2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-10-2015, 01:06 PM
  7. Combining AND,SUMPRODUCT & IF
    By reggie1000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-14-2008, 09:35 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