+ Reply to Thread
Results 1 to 10 of 10

Sumproduct problems eith columns of different formats

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    25

    Sumproduct problems eith columns of different formats

    HI All,

    i have a problem with sumproducts not returning correct values


    Col Format
    Col C = text
    Col E = general
    Col I = Text


    EQ Equity Sheet


    Col C = Text
    Col E = General
    Col G = Text
    Col Z = General


    I want to match col c's, col e's I with G and return and sum the values in Col z.

    =SUMPRODUCT(('EQ Equity'!$C$4:$C$5000=C4)*--('EQ Equity'!$G$4:$G$5000=I4)*--('EQ Equity'!$E$4:$E$5000=$E4),--('EQ Equity'!$Z$4:$Z$5000=$E4))

    Can somebody please help me?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Sumproduct problems eith columns of different formats

    Try it like this:

    =SUMPRODUCT(('EQ Equity'!$C$4:$C$5000=C4)*('EQ Equity'!$G$4:$G$5000=I4)*('EQ Equity'!$E$4:$E$5000=$E4),'EQ Equity'!$Z$4:$Z$5000)

    Hope this helps.

    Pete

  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: Sumproduct problems eith columns of different formats

    Hi,

    We need to see the problem in context. Would you upload your workbook.
    What values are being returned? Wrong values, Error values or no values at all?
    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-28-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Sumproduct problems eith columns of different formats

    Thanks for this , i hadn't noticed the error in the last part. This just returns "0" instead of the value in column z .

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Sumproduct problems eith columns of different formats

    Perhaps the values in column Z are text values that just look like numbers. As Richard suggested, perhaps you can attach your workbook - the FAQ describes how to.

    Hope this helps.

    Pete

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Sumproduct problems eith columns of different formats

    Perhaps test that you get a positive count for the criteria alone: what do you get with this?

    =SUMPRODUCT(('EQ Equity'!$C$4:$C$5000=C4)*('EQ Equity'!$G$4:$G$5000=I4)*('EQ Equity'!$E$4:$E$5000=$E4))
    Audere est facere

  7. #7
    Registered User
    Join Date
    02-28-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Sumproduct problems eith columns of different formats

    Here you go
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-28-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Sumproduct problems eith columns of different formats

    This also returns "0"

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Sumproduct problems eith columns of different formats

    You need a formula like this in AA4:

    =IF(C4="","",SUMPRODUCT(('EQ Equity'!$C$4:$C$56=$C4)*('EQ Equity'!$E$4:$E$56=E4&"")*('EQ Equity'!$G$4:$G$56=I4),'EQ Equity'!$Z$4:$Z$56))

    Note that column E values on the EQ Equity sheet are actually text values so you have to join "" onto E4 to get the same format. Also, you were comparing I4 (a name) to those values, so the third term should refer to column G.

    However, this will still return zeros as column Z contains text values - you should convert these to proper numbers if you want to get a numerical result.

    Hope this helps.

    Pete

  10. #10
    Registered User
    Join Date
    03-18-2013
    Location
    Stryków, Poland
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    21

    Re: Sumproduct problems eith columns of different formats

    You can also use array formula:
    =SUM(('EQ Equity'!$C$4:$C$100=C4)*('EQ Equity'!$G$4:$G$100=I4)*('EQ Equity'!$E$4:$E$100=TEXT($E4,"@"))*(IF(ISERROR(1*'EQ Equity'!$Z$4:$Z$100),0,(1*'EQ Equity'!$Z$4:$Z$100))))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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