+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : If cells are unequal, then concatenate

Hybrid View

abanford If cells are unequal, then... 04-23-2010, 11:41 AM
DonkeyOte Re: If cells are unequal,... 04-23-2010, 11:50 AM
darthux Re: If cells are unequal,... 04-26-2010, 07:56 PM
abanford Re: If cells are unequal,... 04-27-2010, 10:36 AM
  1. #1
    Registered User
    Join Date
    09-17-2007
    Posts
    9

    If cells are unequal, then concatenate

    Happy Friday!

    I am looking for a formula that will concatenate email addresses in cells if they are not the same. I'd rather not have duplicates of the same addresses in the result.

    There's a spreadsheet attached that shows what I am looking for better than I am describing.

    Thanks in advance for your help!
    Alyssa
    Attached Files Attached Files
    Last edited by abanford; 04-27-2010 at 10:35 AM. Reason: SOLVED!

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: If cells are unequal, then concatenate

    one possibility might be:

    G2:
    =REPT(A2&";",A2<>"")&REPT(B2&";",AND(B2<>"",COUNTIF($A2:B2,B2)=1))&REPT(C2&";",AND(C2<>"",COUNTIF($A2:C2,C2)=1))&REPT(D2&";",AND(D2<>"",COUNTIF($A2:D2,D2)=1))&REPT(E2&";",AND(E2<>"",COUNTIF($A2:E2,E2)=1))&REPT(F2&";",AND(F2<>"",COUNTIF($A2:F2,F2)=1))
    copied down
    (note I used a semi-colon delimiter)

  3. #3
    Registered User
    Join Date
    04-26-2010
    Location
    Fort Riley
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: If cells are unequal, then concatenate

    you would type in cell G8:

    "=CONCATENATE(IF(A8=B8,A8,(CONCATENATE(A8,", ",B8))),(IF(C8=D8,D8,(CONCATENATE(C8,", ",D8)))),", ",(CONCATENATE(IF(E8=F8,E8,(CONCATENATE(E8,", ",F8))))))"

    depending if you have blank cells, then you could copy and paste values to remove the extra ", "

    see your attachment with results
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-17-2007
    Posts
    9

    Re: If cells are unequal, then concatenate

    Gracias, DonkeyOte! The formula works like a charm!!

    Thanks for the suggestion, Darthux!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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