+ Reply to Thread
Results 1 to 2 of 2

Compare columns and count matches

  1. #1
    Registered User
    Join Date
    08-31-2019
    Location
    London
    MS-Off Ver
    2013
    Posts
    1

    Compare columns and count matches

    Is there a way to do the following in a formula?

    How do I compare Column 1 and Column 2, and if there is the same text in both rows, count as "1."

    Row 1 Column 1 has Snickers. Row 1 Column 2 has snickers. I would only count that as "1."
    Row 2 has Aero and Snickers so Aero would have "1" and Snickers would have "1"
    Row 3 has Smarties and a blank cell so Smarties would have "1" and Blank cell would have "1"
    Row 4 has Blank and Kitkat, so Blank cell would have "1' and kitkat would have "1"

    In total:

    Snickers: 2
    Aero: 1
    Smarties: 1
    Kitkat: 1
    Blank: 2
    Last edited by FDibbins; 08-31-2019 at 12:42 AM. Reason: Title changed.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Compare columns and count matches

    Hi, welcome to the forum

    For future reference, please review our rules regarding thread titles. I have changed your title for you - this time

    Try something like this...
    =countif(A:A,A1,B:B,B1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Make model faster: convert formulas to text and then back to formulas
    By lucassdm7 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-25-2019, 06:49 AM
  2. Replies: 3
    Last Post: 01-01-2016, 03:44 PM
  3. Replies: 9
    Last Post: 12-04-2015, 05:19 PM
  4. Using Cell references in file paths for formulas to create dynamic formulas
    By MichaelStokesJr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-04-2013, 11:49 AM
  5. Replies: 5
    Last Post: 09-25-2013, 02:51 PM
  6. [SOLVED] VBA to enter various formulas every 10 rows and show dynamic formulas not values
    By faby2203 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-04-2013, 07:05 AM
  7. Replies: 5
    Last Post: 05-05-2008, 02:22 PM

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