+ Reply to Thread
Results 1 to 5 of 5

Possible IF and CONCATENATE??

  1. #1
    Registered User
    Join Date
    09-17-2014
    Location
    Cambridge, England
    MS-Off Ver
    2016
    Posts
    58

    Possible IF and CONCATENATE??

    Hello,

    I am trying to come up with a simple (or difficult - although I am sure it isn't) formula that will allow me to compile a list of each individual endorsement number that applies to the same client. I have attached an example spreadsheet showing how I want it to look. I took a minute to put together, but when I will have several thousand to do at once, it would make my life easier if I can use a formula to do the work for me as part of a macro.

    Basically I will have a whole list of Endorsements that apply on clients insurance policies. These can change in amounts and endorsement codes each time. Some client may just have the one endorsement on their policy, others may have 7!!

    Can anyone think of a formula so that I can compile each individual endorsement code (for each individual client) and compile them in a single cell at the end?

    Any help would be great. I am sure the answer is starring me in the face.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Possible IF and CONCATENATE??

    Perhaps you could Mike Rickson's legendary ConcatIf User-Defined-Function?

    Here is your workbook with the UDF added in.

    Arguments:
    =CONCATIF(criteria range, criteria,output range, delimiter, prevent duplicates as boolean)

    For you, I used:
    =ConcatIf($C$2:$C$22,J2,$E$2:$E$22,"|",TRUE)
    This looks at C2:C22, compares it to J2, Outputs all concatenations of E2:E22 where matched, put | between entries, and prevents duplicates.

    Here's Mike Rickson's sweet beautiful code:
    Please Login or Register  to view this content.
    To use this code in your workbook:
    • Copy the code
    • Go to Excel
    • Hit Alt+F11 to enter VB land
    • Click Insert
    • Choose Module
    • Paste Code
    • Hit Alt+F11
    Attached Files Attached Files
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Possible IF and CONCATENATE??

    You may also try this macro to get the desired output in col. H.
    Please find the attached sheet and click on the Orange button to run the macro to get the desired output.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    09-17-2014
    Location
    Cambridge, England
    MS-Off Ver
    2016
    Posts
    58

    Re: Possible IF and CONCATENATE??

    Thank you both. All sorted.

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Possible IF and CONCATENATE??

    You're welcome and thanks for the feedback as well.

+ 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. Replies: 5
    Last Post: 08-28-2014, 06:01 PM
  2. [SOLVED] VBA concatenate script does not excute as expected, Concatenate and "&" can't be dragged
    By VBAlex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-07-2014, 09:25 AM
  3. Replies: 2
    Last Post: 04-12-2010, 12:35 PM
  4. Concatenate
    By LAFRICK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-08-2010, 10:56 AM
  5. [SOLVED] [SOLVED] I know how to concatenate ,can one de-concatenate to split date?
    By QUICK BOOKS PROBLEM- in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-26-2005, 01:05 PM

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