+ Reply to Thread
Results 1 to 6 of 6

Concatenate / Array Help

  1. #1
    Registered User
    Join Date
    08-14-2014
    Location
    London, England
    MS-Off Ver
    MS Office 10
    Posts
    74

    Concatenate / Array Help

    Hi there,
    I wondered if someone could help with something I'm trying to do.
    I'm trying to remove duplicates from a horizontal list whilst also putting commas in between each unique value and having an "&" sign before the last place.
    I have attached a copy of what I'm trying to do and the column in yellow shows what I am after from each row, I was wondering if this was possible?
    Some rows will have only 1 entry, and some will have up to 6.
    Any questions, just shout.
    Thanks so much.
    SamHelp.xlsx

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Concatenate / Array Help

    Hi,

    Try the following formula in G2:

    =SUBSTITUTE(A2&", "&IF(A2=B2,"",B2)&", "&IF(OR(B2=C2,A2=C2),"",C2)&", "&IF(OR(C2=D2,B2=D2,A2=D2),"",D2)&", "&IF(OR(D2=E2,C2=E2,B2=E2,A2=E2),"",E2)&", "&IF(OR(E2=F2,D2=F2,C2=F2,B2=F2,A2=F2),"",F2)," ,","")
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-14-2014
    Location
    London, England
    MS-Off Ver
    MS Office 10
    Posts
    74

    Re: Concatenate / Array Help

    Thank you very much for your reply.
    Do you know if there is anyway for an "&" sign go before the last location and to remove the "," at the end?

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Concatenate / Array Help

    Hi,

    Sorry for the late response! See the attached file, the formula is a bit lengthy though.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-14-2014
    Location
    London, England
    MS-Off Ver
    MS Office 10
    Posts
    74

    Re: Concatenate / Array Help

    No problem for the delay, thanks for getting back to me. From what I can see the formula you have designed has successfully removed the last "," but it doesn't include the "&" before the last entry (when more than 2 entries).
    e.g. I'm after something which returns this for the first row...

    Bluewater - Wintergarden, Berners Street, Shrewsbury & Nottingham - Market Square

    If there is only one entry then I don't need any "," or "&"

    No worries if this isn't possible, I can use what you have done and it will be very helpful however if you could add this last bit that would be ace.

    Thanks

  6. #6
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Concatenate / Array Help

    Hi,

    See the attached file, I have used the following formula in H2 to get the desired output:

    =IFERROR(REPLACE(G2,FIND("@",SUBSTITUTE(G2,",","@",(LEN(G2)-LEN(SUBSTITUTE(G2,",","")))/LEN(","))),1," &"),G2)
    Attached Files Attached Files

+ 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. =CONCATENATE within an array
    By gassiusmax in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-02-2015, 12:22 PM
  2. How To Concatenate an Array?
    By Camel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-02-2013, 05:01 AM
  3. Variable name concatenate with array
    By Bmoe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2010, 07:20 AM
  4. Array Formula - Concatenate
    By Lotus123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2006, 10:36 PM
  5. Concatenate an array
    By Ed in forum Excel General
    Replies: 4
    Last Post: 07-03-2006, 01:00 PM
  6. Concatenate Multiple Instances in Array
    By sunfish62 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 12:05 PM
  7. How do I concatenate the contents of an array in Excel?
    By Johnnie Walker in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-16-2005, 06:22 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