+ Reply to Thread
Results 1 to 8 of 8

sumproduct problem...one array only if cell non blank

  1. #1
    Registered User
    Join Date
    07-23-2010
    Location
    ct
    MS-Off Ver
    Excel 2003
    Posts
    12

    sumproduct problem...one array only if cell non blank

    I am doing a count with multiple criteria so i am using a sum function to do

    sum(criteria1)*criteria 2

    However, the second criteria is if there is a value in the cell. How do i do this?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct problem...one array only if cell non blank

    You mean?

    =Sumproduct(--(range1=criteria1),--Isnumber(range2))

    or

    =Sumproduct(--(range1=criteria1),--(range2<>""))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: sumproduct problem...one array only if cell non blank

    If you're using SUMPRODUCT, perhaps you're looking for something like:

    =SUMPRODUCT((range1="x")*(range2<>""))

  4. #4
    Registered User
    Join Date
    07-23-2010
    Location
    ct
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: sumproduct problem...one array only if cell non blank

    thank you! the isnumber works. what about if the cell is empty, how do i count that

  5. #5
    Registered User
    Join Date
    07-23-2010
    Location
    ct
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: sumproduct problem...one array only if cell non blank

    also, i need to figure out a function so if a name is in an array i need to add the values from the ajacent cells. the name can reoccur within the first column, so everytime it appears needs to add in the next column. ideas?

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

    Re: sumproduct problem...one array only if cell non blank

    You can use SUMIF, e.g.

    =SUMIF(A:A,"Dave",B:B)

    that will sum all rows in column B where column a = "Dave". If you have your name in C2 you can make that

    =SUMIF(A:A,C2,B:B)
    Audere est facere

  7. #7
    Registered User
    Join Date
    07-23-2010
    Location
    ct
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: sumproduct problem...one array only if cell non blank

    thank you! what about counting empty cells?

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct problem...one array only if cell non blank

    =Sumproduct(--(range1=criteria1),--(range2=""))

+ 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