+ Reply to Thread
Results 1 to 5 of 5

VB Code to trim data and find unique names

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to trim data and find unique names

    Hello:

    Please refer to attached file.
    I have data shown in "Source" sheet in column A as shown.
    I need VB Code to trim 12 characters from left and paste the data in "Dest" Sheet at A2
    Now find the unique Name from this list and paste at "Dest" cell C2.
    Now i need Data Range in column D from data in Column A
    I manually done so in Sheet "Dest".


    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VB Code to trim data and find unique names

    Hi rizmomin,

    Your sample file was taking the 10 not 12 left characters... so that is what the code does, but if you need 12 that is an easy fix as I noted in the comments of the code. See if this works for you:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VB Code to trim data and find unique names

    Hi Riz,

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to trim data and find unique names

    Hello xlaDept & Arkadi:

    Both code works great.
    Lastly i would appreciate if you can help modify the code to give total # of rows the range in column D

    Thanks

    Riz

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VB Code to trim data and find unique names

    Hi Riz,

    You're welcome and thanks for the rep!

    See if this is what you want:

    Please Login or Register  to view this content.

+ 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. VB Code to find Unique Names and sum the total
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-23-2017, 12:13 PM
  2. [SOLVED] VB Code to find Unique names and consolidate
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-19-2016, 06:05 PM
  3. [SOLVED] VB Code to find unique names
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-16-2016, 05:37 PM
  4. Code to find Unique Names
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-19-2016, 04:29 PM
  5. Replies: 7
    Last Post: 12-23-2015, 07:43 AM
  6. VB Code to find Unique Names
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-30-2015, 06:42 PM
  7. Pivot required that sums data for names, where names are not unique
    By ReportRob in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-10-2014, 04:47 AM

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