Closed Thread
Results 1 to 4 of 4

Countif - No Adjacent Cells

Hybrid View

  1. #1
    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
    Quote Originally Posted by windme
    Hello,

    Using Excel 2007

    In the following example I want to count the number of times a "4" shows up but just for the cells A1:D1 and A3:D3 (non adjacent cells). When I write the formula =countif(A1:D1,A3:D3,4) I receive an error.
    See attached sample.

    How can I write a countif formula for non adjacent cells?
    Any help would be appreciated.

    Michael
    Simplest way would be to just add another countif. i.e.
    =COUNTIF(A1:D1,4)+COUNTIF(A3:D3,4)
    Rgds

  2. #2
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158
    Thanks for your reply.

    What could I use if had like 50 or more different non adjacent cells? Is there a sorter, "simpler" formula?
    Thanks.

Closed 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