+ Reply to Thread
Results 1 to 16 of 16

list names under criteria & concatenate

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    list names under criteria & concatenate

    hi folks

    need some help on formula that will lookup material # from sheet1 into sheet2 and list the ppl listed under sheet2 column B.

    if certain material # has multiple entries can you use concatenante function to add multiple names on a single row?

    ie. sheet 1 cell H7 can = "Doe, John ; Maker, Justin ; Sally, Vilma" . if there no result, show blank

    thx i have attached sample..pls help
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: list names under criteria & concatenate

    feedback on this, anyone?

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: list names under criteria & concatenate

    Hi

    to be confirmed with control+shift+enter to get first 3 names (with ripetitions)

    =IFERROR(INDEX('New Materials'!B$7:B$3394,SMALL(IF('New Materials'!F$7:F$3394=C$7,ROW($7:$3394)-6),1)),"")&IFERROR(", "&INDEX('New Materials'!B$7:B$3394,SMALL(IF('New Materials'!F$7:F$3394=C7,ROW($7:$3394)-6),2)),"")&IFERROR(", "&INDEX('New Materials'!B$7:B$3394,SMALL(IF('New Materials'!F$7:F$3394=C7,ROW($7:$3394)-6),3)),"")

    Vba (or function TEXTJOIN) could offer a more convenient approach.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: list names under criteria & concatenate

    Hi canapone

    I applied your formula in cell H7 down

    however, you will notice when i filter on column G where it shows greater than 0 results, there are blanks, when it should have someones name listed. e.g. row H142, column G = 1, however, column H = blank ....it should contain a name.

    thoughts? thank you

  5. #5
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: list names under criteria & concatenate

    As it is array formula it takes ages to recalculate on any changes.
    I think (maybe I am wrong) using VBA is a better options?
    I've created something like below (it take a time also but it can be re-run only on demand):

    Please Login or Register  to view this content.
    not tested so intensively.
    Last edited by KOKOSEK; 04-17-2019 at 11:48 AM.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  6. #6
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: list names under criteria & concatenate

    Hi KOKOSEK

    Thanks for your reply

    I pasted the code, however, it seems it's also finding names for material # that do not exist. also, as you scroll down the table, near the end, the macro seems to copy/paste all the names of people listed?

    also, any chance a countifs formula can be added to column G

  7. #7
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: list names under criteria & concatenate

    Some tweak added:
    1st - checking only if col G shows that something exist (>0)
    2nd - delete contains of already added names (that's what you probably mention about).


    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: list names under criteria & concatenate

    OK sure, i will review and provide feedback thx
    Attached Files Attached Files
    Last edited by jw01; 04-17-2019 at 12:48 PM.

  9. #9
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: list names under criteria & concatenate

    OK. After evening coffee latest version, imho, quite fast:

    Please Login or Register  to view this content.
    Check attached file. Run by button as you wish.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: list names under criteria & concatenate

    Hi KOKOSEK

    Thanks for the awesome macro!

    Just wondering if i can get your help again; the workbook was changed a bit, the "new matters" is now called "data" and the two columns are A, B in data sheet.

    I tried to change the range accordingly and the sheet name in the macro but getting an error:

    Please Login or Register  to view this content.
    can you pls assist? i have attached.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: list names under criteria & concatenate

    any thoughts on this guys?

  12. #12
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: list names under criteria & concatenate

    Codes were in F so names were in (-4) column (B).
    Now codes are in A and names in B, so shift +1

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: list names under criteria & concatenate

    Hi

    thxs for your reply

    just wanted to check as it doesnt seem to be working properly.

    e.g. row 22 in the "matter" sheet should show 1 in column G and show a name in column H

    when i run the macro, it shows 0 and no name. Is there a column that is not being pulled properly? thxs

  14. #14
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: list names under criteria & concatenate

    If you did not change matter sheet everything should be ok.
    When you changing columns/row/sheet names, you have to carefully and precisely change references in VBA codes.
    Start from scratch (I mean from 1 attachments with my 1st working code) and then do these changes 1 by 1 (Sheet name in excel ---> sheet name in VBA, change data column --> change its reference in VBA).

  15. #15
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: list names under criteria & concatenate

    AH got it....
    had to make a change here as well

    Please Login or Register  to view this content.
    Last edited by jw01; 04-23-2019 at 11:22 AM.

  16. #16
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: list names under criteria & concatenate

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    that's getting last non empty row in column A (column number 1).
    You can change it into col. B -->Cells(Rows.Count, 2), or col. C --> Cells(Rows.Count, 3) etc.

+ 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] Return a list of Names based on a criteria
    By Jwilf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2016, 07:26 PM
  2. Replies: 5
    Last Post: 08-10-2016, 08:17 PM
  3. Ranking and Returning A List Of Names If Certain Criteria Are Met
    By Xeba37 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-23-2016, 05:08 PM
  4. [SOLVED] Countifs with multiple criteria and one criteria has a list of names
    By Beefy1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2014, 05:25 PM
  5. [SOLVED] How do you List unique names when the criteria is identical
    By john dalton in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-10-2013, 09:40 AM
  6. formula to assign names from a list with criteria
    By jcnewman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-22-2012, 07:52 AM
  7. select names from a list with criteria
    By bruce71101 in forum Excel General
    Replies: 1
    Last Post: 02-21-2011, 06:04 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