Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 49

Thread: LookUp Value and Concatenate All Found Results

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Dec 2014
    Posts
    3
    Rep Power
    0
    Hi Rick ,

    I have tried your solution , at first it is all working well, but when I open it again there are some errors

    =LookUpConcat(A2,$A$2:$A$20,$C$2:$C$20,", ")

    A2 is the lookup where as it came out as #VALUE!
    and then the final result came out as NAME?
    Pictures 1.jpgPictures 2.jpgNAME?

    anyway of fixing this ?
    Many thanks

  2. #2
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    659
    Rep Power
    13
    Quote Originally Posted by jeffwtn View Post
    Hi Rick ,

    I have tried your solution , at first it is all working well, but when I open it again there are some errors

    =LookUpConcat(A2,$A$2:$A$20,$C$2:$C$20,", ")

    A2 is the lookup where as it came out as #VALUE!
    and then the final result came out as NAME?
    Pictures 1.jpgPictures 2.jpgNAME?

    anyway of fixing this ?
    Many thanks
    Assuming there is no sensitive data... can you post a copy of the workbook so I can debug the problem with a live sheet? If there is sensitive data, can you delete it without affecting the problem you are reporting and then post of copy of that modified workbook instead?

  3. #3
    Junior Member
    Join Date
    Dec 2014
    Posts
    3
    Rep Power
    0
    Quote Originally Posted by Rick Rothstein View Post
    Assuming there is no sensitive data... can you post a copy of the workbook so I can debug the problem with a live sheet? If there is sensitive data, can you delete it without affecting the problem you are reporting and then post of copy of that modified workbook instead?
    Sample attached. Thanks for your help.
    Attached Files Attached Files

  4. #4
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    659
    Rep Power
    13
    Quote Originally Posted by jeffwtn View Post
    Sample attached. Thanks for your help.
    I think Admin posted the solution for you in Message #32... you need to save the workbook as an "Excel Macro-Enabled Workbook (*.xlsm)" and NOT as plain "Excel Workbook (*.xlsx)". When you save the workbook with the macro code in place, click the drop-down under the "File name" field (it is labeled "Save as type:") and select what should be the second item in the list (with the wording I show above). After that, when you reopen the workbook, you will have to click the button to enable the macro code.

  5. #5
    Junior Member
    Join Date
    Jul 2012
    Posts
    4
    Rep Power
    0
    Hi Rick,

    I was looking at your code and it works perfectly except I was hoping to modify it a little to help me which a problem which I am having. Here's a little information regarding my problem.

    I have a workbook which gives me a list of email addresses which are in no order at all, this data is laced in Sheet in Column A . eg.

    Firstname1.lastname1(a)domain.com
    firstname2.lastname2(a)domain.com
    firstname3.lastname1(a)domain.com
    Firstname1.lastname2(a)domain.com
    firstname3.lastname2(a)domain.com
    firstname2.lastname1(a)domain.com

    What i am trying to do is search lastname1 and it display Firstname1.lastname1(a)domain.com, firstname2.lastname1(a)domain.com, firstname3.lastname1(a)domain.com.

    Is there any way to change the code to allow me to do this?

    Thank you in advanced,
    Michael


    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxUbeYSvsBH2Gianox4AaABAg. 9VYH-07VTyW9gJV5fDAZNe
    https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg
    https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgyhQ73u0C3V4bEPhYB4AaABAg
    https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgzIElpI5OFExnUyrk14AaABAg. 9fsvd9zwZii9gMUka-NbIZ
    https://www.youtube.com/watch?v=jdPeMPT98QU
    https://www.youtube.com/watch?v=QdwDnUz96W0&lc=Ugx3syV3Bw6bxddVyBx4AaABAg
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=zHJPliWS9FQ&lc=Ugz39PGfytiMUCmTPTl4AaABAg. 91d_Pbzklsp9zfGbIr8hgW
    https://www.youtube.com/watch?v=zHJPliWS9FQ&lc=UgwbcybM8fXnaIK-Y3B4AaABAg.97WIeYeaIeh9zfsJvc21iq
    https://www.youtube.com/watch?v=vSjTzhoJFdk&lc=UgzTC8V4jCzDHbmfCHF4AaABAg. 9zaUSUoUUYs9zciSZa959d
    https://www.youtube.com/watch?v=vSjTzhoJFdk&lc=UgzTC8V4jCzDHbmfCHF4AaABAg. 9zaUSUoUUYs9zckCo1tvPO
    https://www.youtube.com/watch?v=vSjTzhoJFdk&lc=UgwMsgdKKlhr2YPpxXl4AaABAg
    https://www.youtube.com/watch?v=XQAIYCT4f8Q&lc=UgwTUdEgR4bdt6crKXF4AaABAg. 9xmkXGSciKJ9xonTti2sIx
    https://www.youtube.com/watch?v=XQAIYCT4f8Q&lc=UgwWw16qBFX39JCRRm54AaABAg. 9xnskBhPnmb9xoq3mGxu_b
    https://www.youtube.com/watch?v=XQAIYCT4f8Q&lc=UgzgWvzV-kvC4TJ8O414AaABAg.9xnFzCj8HRM9xon1p2ImxO
    https://www.youtube.com/watch?v=XQAIYCT4f8Q&lc=UgybZfNJd3l4FokX3cV4AaABAg. 9xm_ufqOILb9xooIlv5PLY
    https://www.youtube.com/watch?v=XQAIYCT4f8Q&lc=UgzgWvzV-kvC4TJ8O414AaABAg.9xnFzCj8HRM9y38bzbSqaG
    https://www.youtube.com/watch?v=XQAIYCT4f8Q&lc=UgyWm8nL7syjhiHtpBF4AaABAg. 9xmt8i0IsEr9y3FT9Y9FeM
    https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg. 9xhyRrsUUOM9xpn-GDkL3o
    https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg
    https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=UgzlC5LBazG6SMDP4nl4AaABAg
    https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=UgzlC5LBazG6SMDP4nl4AaABAg. 9zYoeePv8sZ9zYqog9KZ5B
    https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg. 9xhyRrsUUOM9zYlZPKdOpm
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 02-24-2024 at 08:02 PM.

  6. #6
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    659
    Rep Power
    13
    Quote Originally Posted by mickyd View Post
    Hi Rick,

    I was looking at your code and it works perfectly except I was hoping to modify it a little to help me which a problem which I am having. Here's a little information regarding my problem.

    I have a workbook which gives me a list of email addresses which are in no order at all, this data is laced in Sheet in Column A . eg.

    Firstname1.lastname1(a)domain.com
    firstname2.lastname2(a)domain.com
    firstname3.lastname1(a)domain.com
    Firstname1.lastname2(a)domain.com
    firstname3.lastname2(a)domain.com
    firstname2.lastname1(a)domain.com

    What i am trying to do is search lastname1 and it display Firstname1.lastname1(a)domain.com, firstname2.lastname1(a)domain.com, firstname3.lastname1(a)domain.com.

    Is there any way to change the code to allow me to do this?
    If you do not mind the concatenated result not being in sort order, then the code I posted will do what you want right now. The secret is to specify the same range for both the SearchRange and the ResultRange and to specify FALSE for the optional MatchWhole argument. I guess you would also want to specify FALSE for the optional MatchCase argument as well. Give this formula try...

    =LookUpConcat(".lastname1",A1:A6,A1:A6,", ",FALSE,,FALSE)

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://eileenslounge.com/viewtopic.php?p=317218#p317218
    https://eileenslounge.com/viewtopic.php?p=316955#p316955
    https://eileenslounge.com/viewtopic.php?p=316955#p316955
    https://eileenslounge.com/viewtopic.php?p=316940#p316940
    https://eileenslounge.com/viewtopic.php?p=316927#p316927
    https://eileenslounge.com/viewtopic.php?p=317014#p317014
    https://eileenslounge.com/viewtopic.php?p=317006#p317006
    https://eileenslounge.com/viewtopic.php?p=316935#p316935
    https://eileenslounge.com/viewtopic.php?p=316875#p316875
    https://eileenslounge.com/viewtopic.php?p=316254#p316254
    https://eileenslounge.com/viewtopic.php?p=316280#p316280
    https://eileenslounge.com/viewtopic.php?p=315915#p315915
    https://eileenslounge.com/viewtopic.php?p=315512#p315512
    https://eileenslounge.com/viewtopic.php?p=315744#p315744
    https://www.eileenslounge.com/viewtopic.php?p=315512#p315512
    https://eileenslounge.com/viewtopic.php?p=315680#p315680
    https://eileenslounge.com/viewtopic.php?p=315743#p315743
    https://www.eileenslounge.com/viewtopic.php?p=315326#p315326
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40752
    https://eileenslounge.com/viewtopic.php?p=314950#p314950
    https://www.eileenslounge.com/viewtopic.php?p=314940#p314940
    https://www.eileenslounge.com/viewtopic.php?p=314926#p314926
    https://www.eileenslounge.com/viewtopic.php?p=314920#p314920
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 05-20-2024 at 04:10 PM.

  7. #7
    Junior Member
    Join Date
    Jul 2012
    Posts
    4
    Rep Power
    0
    Hi Rick,

    Thank you so much for you help it's worked a charm!

    Just one last request if you don't mind, would there be any way to change the UDF to display the list on separate line within the same cell instead of separating them with ", ". i've just noticed that some cells have up to 40 emails in it and it would be easier to understand if it was like that.

    Cheers,
    Michael


    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=SIDLFRkUEIo&lc=UgzTF5vvB67Zbfs9qvx4AaABAg
    https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg
    https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg
    https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg
    https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgzMCQUIQgrbec400jl4AaABAg
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugx12mI-a39T41NaZ8F4AaABAg.9iDQqIP56NV9iFD0AkeeJG
    https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg. 9irLgSdeU3r9itU7zdnWHw
    https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzFkoI0n_BxwnwVMcZ4AaABAg
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9htG01cKBzX
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg. 9ht16tzryC49htJ6TpIOXR
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwMKwGZpDjv7vi7pCx4AaABAg
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg. 9ht16tzryC49htOKs4jh3M
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgxVW-am20rQ5GFuJ9F4AaABAg
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 10-24-2023 at 02:54 PM.

  8. #8
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    659
    Rep Power
    13
    Quote Originally Posted by mickyd View Post
    Just one last request if you don't mind, would there be any way to change the UDF to display the list on separate line within the same cell instead of separating them with ", ". i've just noticed that some cells have up to 40 emails in it and it would be easier to understand if it was like that.
    Sure, all we have to do is replace the ", " delimiter with the Line Feed character. Since the Line Feed character has an ASCII code of 10, we can use CHAR(10) for the delimiter...

    =LookUpConcat(".lastname1",A1:A6,A1:A6,CHAR(10),FA LSE,,FALSE)

    Don't forget to turn "Wrap text" on for the cell you put this formula in. You will also have to widen the column enough so that the individual lines do not wordwrap at the right edge of the cell.

  9. #9
    Junior Member
    Join Date
    Jul 2012
    Posts
    4
    Rep Power
    0
    That's perfect, thanks a lot Rick.

    Only thing I need to work out now is why my spreadsheet keeps crashing on me .

  10. #10
    Junior Member
    Join Date
    Jul 2012
    Posts
    4
    Rep Power
    0
    I'm going to sound really dumb...

    but how do i implement the Marco instead of the UDF.... My spread sheet is driving me nuts atm.

Similar Threads

  1. Replies: 5
    Last Post: 06-04-2013, 01:04 PM
  2. Replies: 6
    Last Post: 12-12-2012, 08:03 PM
  3. Lookup lookup lookup just can't make it work
    By work2live in forum Excel Help
    Replies: 1
    Last Post: 12-08-2012, 11:48 PM
  4. Excel found unreadable content
    By zyousafi in forum Excel Help
    Replies: 2
    Last Post: 08-08-2012, 10:41 AM
  5. Concatenate Multiple Lookup Values in Single Cell
    By Admin in forum Download Center
    Replies: 4
    Last Post: 04-06-2012, 09:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •