+ Reply to Thread
Results 1 to 7 of 7

Macro to Pull a Name List and reformat in another cell

  1. #1
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Macro to Pull a Name List and reformat in another cell

    Would like a macro to copy all names in column Y and place them below starting in row A39, then convert those names into the RF format in B39, Keep in mind that Y could have 2 names or 22,354 names.

    So the list of names would be rewritten in A39 and below
    and then those names would be formatted in the RF format.

    So if the name in Y2 is "DeRamus, Kristina"

    then the name "DeRamus, Kristina" will appear in A39, and then will be formatted to say KDeRamusRF

    So basically, First Name Initial, Last Name, then RF with no spaces or commas between, as shown in the examples.
    Attached Files Attached Files
    Last edited by 00Able; 03-04-2011 at 07:19 PM.
    Providing Problems for Your Solutions
    STARS are my Punching Bag, You will be rewarded.

    In the rare event that I may help you, feel free to make me see STARS

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Macro to Pull a Name List and reformat in another cell

    Hi 00Able,
    I have a short story for you.

    One of my first computer jobs was to do Tech Support for a software company. We logged each call by state of caller. We had a list of states printed with their code next to them. Alabama was 01, Alaska was 02, Arizona was 03, etc. Every call we answered we had to look at this stupid sheet to convert the State to their 2 digit number. It was then that I decided, computers were supposed to make work easier for us instead of harder.

    Computers should have give information to help us understand our language instead of converting our language to its.

    This short story is to suggest you use people's real names instead of trying to trim, convert, truncate or merge them into something that humans need to figure out. My answer to this question is - don't do it.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro to Pull a Name List and reformat in another cell

    I agree and am not happy about having to do this, my issue is that their are 2 different sources, that is feeding this data (which neither do I have the ability to change) and somehow I need to connect the dots. Unfortunately, the only source I have in the one report is RF names, and so I need to convert the names into RF's so I can automatically pull the other data...I hope that makes sence, if I had my way, they would use their employee ID...but alas I don't...
    Last edited by 00Able; 03-03-2011 at 10:54 PM.

  4. #4
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro to Pull a Name List and reformat in another cell

    Also to provide some more detail, there are 2 reports being imported into this sheet. I need to extract some data from one report and put it into the other report in that format. That is why I said above, that the only field that is directly related to a person, is the RF Name.

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

    Re: Macro to Pull a Name List and reformat in another cell

    You could use formulae for this but VBA wise one approach based on the limited sample might be:

    Please Login or Register  to view this content.
    this is one of a large number of alternatives (regexp etc) but should be pretty quick even with large datasets

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Macro to Pull a Name List and reformat in another cell

    Here is the code and attached to check it.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro to Pull a Name List and reformat in another cell

    Thanks Guys they work as planned.

+ 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