Share via

ID all rows with same value in first cell

André Boshoff 20 Reputation points
2025-07-26T11:16:21.13+00:00

I want to identify all rows with same value in first cell, then pick up those rows to do a vlookup on all the rows where the values are found

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

Answer accepted by question author

  1. HansV 462.6K Reputation points MVP Volunteer Moderator
    2025-07-26T12:28:03.09+00:00

    If you have a recent version of Excel, you can use the FILTER function, if necessary in combination with CHOOSECOLS.

    Let's say your data are on a sheet named Detail Sheet, in A2:K100.

    On the other sheet, you enter a family key in B1.

    In another cell, say in A3, enter the formula

    =FILTER('Detail Sheet'!A2:K100, 'Detail Sheet'!A2:A100=B1, "No Match")

    If you want to return values from selected columns only, say columns B, C, E and H (column numbers 2, 3, 5, 8):

    =IFERROR(CHOOSECOLS(FILTER('Detail Sheet'!A2:K100, 'Detail Sheet'!A2:A100=B1), 2, 3, 5, 8), "No Match")

    1 person found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points MVP Volunteer Moderator
    2025-07-29T09:57:24.3566667+00:00

    The solution turned out to be formulas like this:

    =FILTER('People Detail'!$B$4:$B$39, ('People Detail'!$A$4:$A$39=$E$1)*('People Detail'!$G$4:$G$39="Main"), "")

    =FILTER('People Detail'!$B$4:$B$39, ('People Detail'!$A$4:$A$39=$E$1)*('People Detail'!$G$4:$G$39="Spouse"), "")

    etc.

    1 person found this answer helpful.
    0 comments No comments

  2. André Boshoff 20 Reputation points
    2025-07-28T23:01:04.3566667+00:00

    Thank you so much​ for your great support Hans! 

    The solution you provded is working very well.

    0 comments No comments

  3. André Boshoff 20 Reputation points
    2025-07-27T11:24:02.1966667+00:00

    Hi HansV

    Thank you for your respons. Appreciated!

    Could you, for additional information from my side please also refer to the additional note to Marcin perhaps?

    0 comments No comments

  4. Marcin Policht 87,815 Reputation points MVP Volunteer Moderator
    2025-07-26T11:25:41.6833333+00:00

    Let's consider the following example:

    A (Key) B (Name) C (Score)
    101 Alice 85
    102 Bob 90
    101 Carol 95
    103 Dave 88
    102 Eve 91

    Step 1: Identify duplicates in column A

    In column D, write the following formula:

    =COUNTIF(A:A, A2)>1
    

    This returns TRUE for rows where A appears more than once.

    Step 2: Filter for duplicate keys

    1. Select your table (A1:D6 in the example).
    2. Turn it into a Table (Ctrl+T).
    3. Filter Column D to show only TRUE (duplicate keys).

    Step 3: VLOOKUP using the duplicates

    Now let's say you want to VLOOKUP the Score (C) for each Name (B) based on these duplicates.

    In Column E, use:

    =VLOOKUP(B2, B:C, 2, FALSE)
    

    This looks up the Name (B2) in Column B and returns the Score (Column C). It works for the rows where duplicates were found in Column A.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.