+ Reply to Thread
Results 1 to 4 of 4

Thread: Excel count function for specific cells

  1. #1
    Registered User
    Join Date
    07-08-2010
    Location
    Wicklow, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    7

    Excel count function for specific cells

    Hi,
    I have a spreadsheet and I am trying to use a count function for data in specific columns only
    e.g.
    Column A: 1
    Column B: 3
    Column C: (A+B) 4
    Column D: 4
    Column E: 0
    Column F: (D+E) 4
    I am trying to get a count of the number of columns that contain the value 4 but only as an input value as opposed to the sum of any other values (if that makes sense), in this case I do not want to include columns C or F in my count function.
    Anyone any suggestions?
    Thanks

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,225

    Re: Excel count function for specific cells

    Try =COUNTIF(A1:B1,4)+COUNTIF(D1:E1,4) or =COUNTIF(A1:E1,4)-(C1=4)
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Registered User
    Join Date
    07-08-2010
    Location
    Wicklow, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Excel count function for specific cells

    Thanks zbor,
    The range of columns I am interrogating is over 100 with the formula every 3 cells, would be hoping for a slightly more efficient way of doing this if possible
    Regards

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,225

    Re: Excel count function for specific cells

    Try this... Extend ranges as you need:

    =SUMPRODUCT(--(A1:H1=4), --(MOD(COLUMN(A1:H1), 3)<>0))
    "Relax. What is mind? No matter. What is matter? Never mind!"

+ 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.2.0