+ Reply to Thread
Results 1 to 5 of 5

How I can pair two cells that have the same value in different columns

  1. #1
    Registered User
    Join Date
    01-26-2021
    Location
    serbia
    MS-Off Ver
    365
    Posts
    11

    How I can pair two cells that have the same value in different columns

    I apologize in advance for my poor English.

    How I can pair cells from different columns based on the same (exact) value (number).
    Similar numbers are repeated in both columns, but I need to write in column C which number from column B has its pair anywhere in column A.
    The table is large and can be several hundred pairs.

    example3.jpg

    One pair = one unpaired number anywhere in column B and the first same unpaired number from top to bottom in column A.

    As a rule, each number from column A will be paired with the number in column B, but not every number from column B will be paired with the number in column A. Column B will contain more numbers (row) than column A.
    Last edited by scrzzt; 01-29-2021 at 03:48 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,748

    Re: How I can pair two cells that have the same value in different columns

    It looks like when you say "pair" you mean that a number in column A can only be paired once, but your data doesn't give an example of this. I assume that if you had one more 100 in column B, it would be paired, but if you had a fourth 100 it would not. Put this in C3 and copy down:

    =IF(COUNTIF(A:A,B3)>=COUNTIF(B$3:B3,B3),"PAIR","")

  3. #3
    Registered User
    Join Date
    01-26-2021
    Location
    serbia
    MS-Off Ver
    365
    Posts
    11

    Re: How I can pair two cells that have the same value in different columns

    OMG! This works...
    I tried everything but I didn't even think about this ...

    Thank you very much

    Best regards

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,748

    Re: How I can pair two cells that have the same value in different columns

    I am glad to help! Thanks for the rep.

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

  5. #5
    Registered User
    Join Date
    01-26-2021
    Location
    serbia
    MS-Off Ver
    365
    Posts
    11

    Re: How I can pair two cells that have the same value in different columns

    I added one small thing to make the formula more appropriate for me.

    =IF(AND(COUNTIF(A:A;B3)>=COUNTIF(B$3:B3;B3);B3<>"");"PAIR";"")

    Thanks a lot again.
    Last edited by scrzzt; 01-29-2021 at 04:32 PM.

+ 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. [SOLVED] Convert Single Pair of Columns to 3 Column (Pair) List
    By kencoburn in forum Excel General
    Replies: 7
    Last Post: 03-04-2017, 01:43 PM
  2. How do I pair 2 columns - See decription
    By Sharrow in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-06-2012, 09:35 AM
  3. How to pair to columns - see decription
    By Sharrow in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 08-02-2012, 09:30 AM
  4. Replies: 3
    Last Post: 07-20-2012, 07:29 PM
  5. Replies: 1
    Last Post: 03-13-2012, 12:56 AM
  6. Comparing a pair of columns
    By madadd in forum Excel General
    Replies: 3
    Last Post: 03-21-2011, 11:23 AM

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