+ Reply to Thread
Results 1 to 4 of 4

counting two ajacent cells on same row

  1. #1
    Registered User
    Join Date
    04-16-2015
    Location
    Simeria
    MS-Off Ver
    2021
    Posts
    97

    counting two ajacent cells on same row

    Hi
    Need help with a formula to count two adjacent cells on same row like in uploaded file
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: counting two ajacent cells on same row

    Enter "3A" in cell J2.

    Enter "1B" in cell K2.

    Try this formula:

    =COUNTIFS($C$5:$G$14,J2,$D$5:$H$14,K2)
    Attached Files Attached Files

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

    Re: counting two ajacent cells on same row

    Put this formula in J5:

    =SUMPRODUCT(($C$5:$G$14=LEFT($K$2,2))*($D$5:$H$14=RIGHT($K$2,2)))

    I get the answer 4, as there is another pair on row 14 which you have not marked.

    Hope this helps.

    Pete

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,823

    Re: counting two ajacent cells on same row

    Here's another option:
    =COUNTIFS(C5:H14,"3A",OFFSET(C5:H14,0,1),"1B")

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Ajacent cells to calculate next interval by date
    By rcduenes in forum Excel General
    Replies: 2
    Last Post: 12-08-2015, 11:39 AM
  2. Ajacent cells to calculate next interval by date
    By rcduenes in forum Hello..Introduce yourself
    Replies: 3
    Last Post: 12-08-2015, 10:42 AM
  3. Copy ajacent cell based on value to another sheet.
    By scam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2014, 11:40 PM
  4. [SOLVED] Find value in column, and display ajacent cell
    By Chris.Fadden in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-24-2013, 12:04 PM
  5. [SOLVED] Hide non ajacent colums with a Macro
    By Shazz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-01-2013, 09:54 AM
  6. Read ajacent cells, but skip a cell when displaying output
    By miam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2011, 07:54 PM

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