+ Reply to Thread
Results 1 to 11 of 11

How to detect a linear combination of 2 names within a range of cells including that row?

  1. #1
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    How to detect a linear combination of 2 names within a range of cells including that row?

    Hi there,

    I have an issue with a formula that I can't figure out, hopefully someone here can help me. Please check my spreadsheet sample attached to this post, you will have all the information to understand what I'm trying to do.

    Here is a summary though but I'm not sure it will make any sense if you don't look at the spreadsheet:

    I'm trying to find duplicates(s) of a linear combination of 2 cells in 1 single row (row of the formula) within a range of cells that also includes that row. The formula needs to write DUPLICATE if the linear combination of Name 1 + Name 2 or Name 2 + Name 1 of 1 single row exists more than once in a cell range also including the row of the formula.

    I found a way to do it but only when the names to be detected are not within the cell range of the row of the formula, but this is not what I'm trying to do.

    Like I said, this probably don't make any sense, but you will understand if looking at my spreadsheet.

    Thanks everyone!
    Attached Files Attached Files
    Last edited by PuppaVince; 10-26-2020 at 03:32 AM. Reason: JeteMc found the perfect solution to my problem. great job!

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    In C2 copied down, try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    Thanks so much ChemistB, this is very helpful. However, if I use your formula, whenever I try to delete the duplicate or even if I delete all the values in cells A2:B9, it still says Duplicate in column C.

    So by default it always says Duplicate which is not what I'm trying to achieve. See attached picture to see what I mean.

    Thanks
    Attached Images Attached Images

  4. #4
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    when you delete the cell you end up getting the duplicate returned because there its matching column A with column B and one of them is a blank.
    This small modification to ChemistB's formula seem to address that by adding a space between the two columns results in the formula to avoid the mismatching

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,457

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    Try:

    Please Login or Register  to view this content.
    Quang PT

  6. #6
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    Thx for the input but unfortunately this not working either. It seems that with your formula it is only detected as Duplicate in the case where the duplicates are not in the same column. If you look at the picture attached, you can see that it only detect the duplicate for row 3 & 8 when phone 1 and phone 2 are inverted...
    Attached Images Attached Images

  7. #7
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    Hi Crooza,

    Unfortunately this is not working either as you can see on the picture attached. I still get Duplicate whenever i get a blank row. If 2 blank row, I could understand as it is a duplicate of a blank row but when only 1 blank row, it shouldn't. Ideally, it should not say duplicate even if i have 2 blank rows though...
    Attached Images Attached Images

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    Try this modification of ChemistB's formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    Thanks JeteMc, this is working perfectly!! Thanks again to everyone for their input, this is going to save me significant time!

    Best regards!

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: How to detect a linear combination of 2 names within a range of cells including that r

    Another one

    =LOOKUP(MIN(INDEX(COUNTIFS(A$2:B$9,A2:B2),)),{0;1;2},{"";"OK";"Duplicate"})

+ 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] Code to detect if there are any cells which are not blank in a selected Range
    By hans302 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2018, 06:12 AM
  2. Fill in blank cells with linear values with linear percentage increases
    By jstanley41 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-21-2018, 03:31 PM
  3. Percentage/today/range of cells/including empty cells
    By pgohlke in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-28-2016, 09:08 PM
  4. Determine if range of cells is already merged cells, all unmerged or combination
    By Mitchw82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2015, 05:03 PM
  5. [SOLVED] Detect when all cells in a range change value
    By ozizushi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2014, 12:09 PM
  6. Detect text in a range of cells, prioritise what appears in another cell
    By LTrain89 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2013, 12:06 AM
  7. ring to detect if a range of cells is empty
    By neowok in forum Excel General
    Replies: 6
    Last Post: 09-29-2009, 11:00 AM

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