+ Reply to Thread
Results 1 to 12 of 12

Need help with 'Concatinate' function

  1. #1
    Registered User
    Join Date
    12-19-2019
    Location
    Queens, NY
    MS-Off Ver
    2013
    Posts
    27

    Need help with 'Concatinate' function

    I have a spreadsheet I use to track orders. Column P in my sheet uses a "vlookup" formula to show data in cells ranging from P40:P73. I want to reference all of the data in that range into another cell (call it cell A1) preferably with spacing or commas to separate the row data. I came close using a combo of "transpose" and "concatenate", but some of the cells in column P have no data to pull in from the 'vlookup' formula, so those cells return a 'N/A' result. If any cell in range P40:P73 returns an 'N/A' result, then the 'concatenate' function won't work and I get an 'N/A' result in cell A1. Is there a way to concatenate and skip or ignore 'N/A' result data?

  2. #2
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Re: Need help with 'Concatinate' function

    can you have a workbook to show what you want ?

    Show the data you have in hand and May be mock up the desired result
    If you think someone helped you, click on the "* Add Reputation" as a way to say thank you.

    If your problem is solved, go to Thread Tools and select Mark This Thread Solved

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Need help with 'Concatinate' function

    Hello jvcalandra. Welcome to the forum.

    Please upload a small Excel workbook that illustrates what you are working with and what you hope to accomplish. The instructions for doing so are in the 'gold' banner at the top of this page.
    Dave

  4. #4
    Registered User
    Join Date
    12-19-2019
    Location
    Queens, NY
    MS-Off Ver
    2013
    Posts
    27

    Re: Need help with 'Concatinate' function

    I've summarized some general data into a sample sheet and attached it here. Thank you for helping.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,456

    Re: Need help with 'Concatinate' function

    Explain the desired result - where is it coming from, where should it go and why?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Need help with 'Concatinate' function

    A bit confused. If you select 1 2 and 4 in column L, you want the 3 maatching values t appear concatenated in one cell? Correct?

    If not, please exlain more slowly!!

    Option 1: helper column & ordinary formula.

    Option 2 a UDF (needs an .xlsm marcro enabled file.

    You choose...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  7. #7
    Registered User
    Join Date
    12-22-2014
    Location
    Netherlands
    MS-Off Ver
    O365
    Posts
    58

    Re: Need help with 'Concatinate' function

    Wrap your Vlookup with an if.error

    So =iferror(vlookup(a1;B1:C10;2;false)"")

    If not found "" nothing will be shown.
    Instead of nothing you could also say "Not found"

    and you can also wrap your concatenate function with an if.error

    good day sir !

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,456

    Re: Need help with 'Concatinate' function

    I think you've misunderstood the query. This is about concatenating results, not replacing errors.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Need help with 'Concatinate' function

    Here's the vba option...

    Happy to explain it.
    Attached Files Attached Files

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Need help with 'Concatinate' function

    As you have posted in the Formulas sub-forum, I supposed that you wanted a formula-based solution. Use column G as a helper column, with this formula in G2:

    =IF(AND(ISNUMBER(MATCH(A2,$L$3:$L$6,0)),COUNTIF(A$2:A2,A2)=1),MAX(G$1:G1)+1,"-")

    Copy this down to the bottom of your data (or beyond, if you expect to add more data). Then you can use this formula in the cell where you want to see the result:

    =SUBSTITUTE(IFERROR(PROPER(INDEX(B:B,MATCH(1,G:G,0)))&", ","") & IFERROR(PROPER(INDEX(B:B,MATCH(2,G:G,0)))&", ","") & IFERROR(PROPER(INDEX(B:B,MATCH(3,G:G,0)))&", ","") & IFERROR(PROPER(INDEX(B:B,MATCH(4,G:G,0)))&", ","") &"z",", z","")

    This will give you up to 4 destinations, but it is easy to expand if you need more - notice that the MATCH terms have the numbers 1, 2, 3 and 4 (in red), so you can just keep adding more of the IFERROR terms and change that number. You will also need to change the range $L$3:$L$6 in the first formula to suit.

    Hope this helps.

    Pete

  11. #11
    Registered User
    Join Date
    12-19-2019
    Location
    Queens, NY
    MS-Off Ver
    2013
    Posts
    27

    Re: Need help with 'Concatinate' function

    Hi Glenn, you are correct.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Need help with 'Concatinate' function

    So... Are you OK with either of the solutions offered?

+ 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. Ignore #N/A while concatinate
    By shivspatil in forum Excel General
    Replies: 4
    Last Post: 01-29-2016, 10:44 AM
  2. come up with another option to concatinate
    By PrncssJ in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-05-2014, 06:29 PM
  3. Concatinate a matrix
    By m2_ilango in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2014, 04:20 AM
  4. Concatinate
    By arnab0711 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-26-2008, 05:05 PM
  5. [SOLVED] EXCEL 2003: how to add CR or alt-enter using CONCATINATE function
    By MRHenn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2006, 10:40 PM
  6. concatinate and vlookup
    By darsg in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-27-2005, 05:05 PM
  7. Concatinate worked but...
    By Newbie in forum Excel General
    Replies: 2
    Last Post: 06-11-2005, 07:05 PM

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