+ Reply to Thread
Results 1 to 3 of 3

Countif and sumproduct help

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    1

    Countif and sumproduct help

    I have the following formula, and have a continuation to it, for which i am getting an error saying "Fomula is too long". Can I use a sumproduct formula along with countif, i have 26 columns to which i have to apply this formula.

    ($F$2)*COUNTIF(F3, "Yes")+($F$2)*COUNTIF(F3, "No")+($G$2)*COUNTIF(G3, "Yes")+($G$2)*COUNTIF(G3, "No")+($H$2)*COUNTIF(H3, "Yes")+($H$2)*COUNTIF(H3, "No")+($I$2)*COUNTIF(I3, "Yes")+($I$2)*COUNTIF(I3, "No").... and goes on.

    Please help me

  2. #2
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: Countif and sumproduct help

    use

    =SUMPRODUCT((--($F$3:$AE$3="Yes")+--($F$3:$AE$3="No")),$F$2:$AE$2)
    or
    =SUMPRODUCT(($F$3:$AE$3={"Yes";"No"})*$F$2:$AE$2)
    Last edited by Azam Ali; 09-19-2011 at 03:23 AM.
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  3. #3
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Countif and sumproduct help

    You can use SUMIF()
    Please Login or Register  to view this content.
    Hope that helps,

    Colin

    RAD Excel Blog

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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