+ Reply to Thread
Results 1 to 6 of 6

Range of data copied to cell on different sheet, remove duplicates

  1. #1
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Question Range of data copied to cell on different sheet, remove duplicates

    Greetings,

    Attached are 3 sheets of this sample workbook. Tech Form, Data, and Log Sheet. I am attempting to copy my selections from the Tech form C19:C26 to the Log sheet in cell J2. The responses need to be truncated to the first word of each cell C19:C26 on the Tech Form and duplicate responses need to be eliminated from the copy to J2 on the log sheet.

    Example: C19 SSEPs (Ulnar)
    C20 SSEPs (Posterior Tibial)
    C21 TceMEP (Upper)
    C22 TceMEP (Lower)
    C23 TOF
    C24 S-EMG (2 extremities)
    C25 EEG
    C26 Cortical_Mapping

    Desired output in this example to J2 on log sheet: SSEPs, TceMEP, TOF, S-EMG, EEG, Cortical_Mapping

    The Tech Form drop down responses being worked with are being pulled from the DATA sheet in Column K.

    The Range of C19:C26 on the Tech Form is not always fully utilized. Sometimes we may have just a couple of entries. Also the selection order may be different from one user to another.

    Anyone in the forum have a solution for this? I am relatively new to excel and I am finding the learning curve fairly steep for the things I am trying to accomplish on this project. Solutions w/ explanation and or assistance on this issue is greatly appreciated.

    Thank you,

    Patrick
    Attached Files Attached Files
    Last edited by pjbassdc; 07-25-2011 at 09:36 PM.

  2. #2
    Registered User
    Join Date
    07-14-2011
    Location
    Lohr, Germany
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: Range of data copied to cell on different sheet, remove duplicates

    Patrick,
    I only can think of a VBA solution using a Collection for this task.
    Not sure whether you want to go this route. If so, let me know and I can put some code together in your example book.

  3. #3
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Range of data copied to cell on different sheet, remove duplicates

    Richard,

    Thank you for your kind offer. I know nothing of VBA coding. If you think that this is the best option, I would love to see what you come up with. If you need more information, please ask.

    Thanks again,

    Patrick

  4. #4
    Registered User
    Join Date
    07-14-2011
    Location
    Lohr, Germany
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: Range of data copied to cell on different sheet, remove duplicates

    Patrick,
    I wrote a little UDF (user defined function) for you, which should do what you need.
    It's generic and can be used everywhere to perform the task of concatenation of cell values of a range.
    The default arguments of the function are set to your requirements but can be changed when required. See the comments in the code for more details.
    For splitting the cell values to use only the first element I have used a function provided to the Excel-L community by Duane Hookum.
    I have implemented it in the attached sample sheet .

    Have fun
    Richard

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

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Range of data copied to cell on different sheet, remove duplicates

    like this with formulas
    edit changed to allow for blanks also reset last cell on tech form sheet to reduce workbook size
    Attached Files Attached Files
    Last edited by martindwilson; 07-23-2011 at 09:45 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Thumbs up Re: Range of data copied to cell on different sheet, remove duplicates

    A very big thank you to Richard and Martin for your input and help crafting a solution to my original post. Both methods work well and will go a long way in helping with my current and future projects.


    Cheers,
    Patrick

+ 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