+ Reply to Thread
Results 1 to 3 of 3

Count pairs of values in adjacent columns (either way around)

  1. #1
    Registered User
    Join Date
    07-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Count pairs of values in adjacent columns (either way around)

    I have pairs of values in adjacent columns. I should like a count of the number of times each pair occurs - either way around, i.e. Mary-Fred OR Fred-Mary. Thx. Example:

    Bill Joe 1
    Sue Mary 1
    Fred Mary 2
    Joe Sue 1
    Mary Fred 2
    Last edited by Alfie101; 01-23-2016 at 04:24 AM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Count pairs of values in adjacent columns (either way around)

    C1
    Please Login or Register  to view this content.
    Try this and copy towards down
    Change the range as per your needs
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Count pairs of values in adjacent columns (either way around)

    Or
    =sumproduct(countifs(a$1:a$5,a1:b1,b$1:b$5,choose({1,2},b1,a1)))

+ 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. Look up values in 2 adjacent columns. Return values in 3 columns if match.
    By Gssoc777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-04-2015, 12:28 PM
  2. Replies: 3
    Last Post: 08-25-2015, 02:03 PM
  3. [SOLVED] Count of adjacent values
    By dancing-shadow in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-03-2014, 04:05 AM
  4. Counting Pairs of Adjacent Values in Same Column
    By Gregg Gonsalves in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-03-2013, 08:18 AM
  5. Count number of pairs between 2 columns
    By Johnald in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-09-2013, 06:46 PM
  6. Replies: 0
    Last Post: 01-29-2012, 12:00 PM
  7. Count of pairs of cells with diffenent corresponding values in 2 datasets
    By agarwaldvk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-20-2008, 11:15 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