+ Reply to Thread
Results 1 to 18 of 18

Replace alphanumeric code in Matrix with Volunteer Names

  1. #1
    Registered User
    Join Date
    02-14-2011
    Location
    MidWest
    MS-Off Ver
    Excel 2007
    Posts
    9

    Replace alphanumeric code in Matrix with Volunteer Names

    I am hoping somebody can help me with the following.

    I have an Excel 2016 file that has two tabs/worksheets. On the first worksheet is a long list of volunteer names (column B) with an alphanumeric code in column "A" preceding their name. For example, A1, A2, A3, .... K1, K2, K3, etc...

    On the other worksheet is a matrix that has the days of the week as the column headings and specific tasks as the row headings. Instead of typing names in each cell within the matrix, I have typed in the an alphanumeric code as mentioned above. Because this matrix is quite large, an alphanumeric code such as "A1" will appear multiple times.

    So my goal is to have the matrix filled-out with all these alphanumeric codes and then somehow, via a macro or something, change all the alphanumeric codes to the associated name. It is important that I see the matrix filled-out with the alphanumeric codes first, and then have the ability to convert to the names. Any assistance provided would be greatly appreciated. Thank you for your time.
    Attached Files Attached Files
    Last edited by crew696; 05-07-2019 at 08:56 AM. Reason: Added Example File

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    It is looks like possible to sort with VLOOKUP.
    Can you attached samples file, please?
    Put some mock data and expected results in there.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    02-14-2011
    Location
    MidWest
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Thanks. I have added an example file in my post.

  4. #4
    Registered User
    Join Date
    02-14-2011
    Location
    MidWest
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Quote Originally Posted by KOKOSEK View Post
    It is looks like possible to sort with VLOOKUP.
    Can you attached samples file, please?
    Put some mock data and expected results in there.
    Thanks for offering to help. Example file has been added to original posting.

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Try this:-
    There are 2 codes here, The first in "CommandButton1" to alter the Alphanumeric characters to Names, and the "2nd code that returns the Names back to Alphanumeric characters (Delete if not required).
    Both codes run on "Command Buttons" and should be placed in the a Worksheet Module.
    Please Login or Register  to view this content.
    Regards Mick

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Into D20:

    Please Login or Register  to view this content.
    and drag it right and down as needed.

    Check in attached file that everything has been assigned correctly.
    Attached Files Attached Files

  7. #7
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Try this:-
    Attached Files Attached Files

  8. #8
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Quote Originally Posted by MickG View Post
    Try this:-
    Why:
    Capture.JPG
    if B1 is Jones1
    Capture2.JPG

  9. #9
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Why ???
    Because there is no "Doe1" in sheet 1, I imagined this was a data error, and just used the data on sheet1.

  10. #10
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Quote Originally Posted by MickG View Post
    Why ???
    Because there is no "Doe1" in sheet 1, I imagined this was a data error, and just used the data on sheet1.
    Sorry, I did not spot that you have replace in top table. As you said expected results have been incorrect.
    As OP said he wants to see codes and names so I've used VLOOKUP for bottom table and codes are still visible in top and names at bottom.

  11. #11
    Registered User
    Join Date
    02-14-2011
    Location
    MidWest
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Quote Originally Posted by MickG View Post
    Try this:-
    Thank you very much. That is perfect for what I need and I greatly appreciate the help. Have a great day!

  12. #12
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    You're welcome

  13. #13
    Registered User
    Join Date
    02-14-2011
    Location
    MidWest
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    MickG: I have been using the spreadsheet you were kind enough to send me and it has been extremely helpful. I did run into a minor issue. I selected the button that changed "names to range" and saved the file and close excel. I then went back in to make a modification and selected the "return names to alphanumeric" and it didn't work. Any idea how to fix this? Thanks again for your help.
    Last edited by crew696; 08-13-2019 at 02:58 PM. Reason: Edited for clarification.

  14. #14
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Here is another macro that you can consider...
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 08-14-2019 at 03:22 PM.

  15. #15
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Crew696
    I'll have a look !!!!
    Try this instead of the second code for returning !!
    Please Login or Register  to view this content.
    Regards Mick
    Last edited by MickG; 08-14-2019 at 12:56 PM.

  16. #16
    Registered User
    Join Date
    02-14-2011
    Location
    MidWest
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Absolutely perfect! Thank you so very much Mick and have wonderful day.

  17. #17
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    Quote Originally Posted by crew696 View Post
    Absolutely perfect! Thank you so very much Mick and have wonderful day.
    Just wondering if you tried the code (ReplaceCodesWithNames) I posted in Message #14 yet (codet to names)? Here it is again along with a companion macro (ReplaceNamesWithCodes) to reverse the process (names back to codes) which I see Mick gave you...
    Please Login or Register  to view this content.

  18. #18
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Replace alphanumeric code in Matrix with Volunteer Names

    You're welcome

+ 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. [SOLVED] Help needed with VBA code to replace values with names and delete others Values
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-10-2015, 01:50 AM
  2. Volunteer Roster Help
    By DBS959 in forum Excel General
    Replies: 2
    Last Post: 09-13-2014, 01:25 PM
  3. Replace any non-alphanumeric char with dash
    By theblade24 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2013, 02:40 PM
  4. Help w/ Macro: alphanumeric find/replace
    By ronniebabar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2011, 03:03 PM
  5. Eliminate names from a matrix of names
    By MFT in forum Excel General
    Replies: 2
    Last Post: 05-05-2010, 04:16 AM
  6. Replace bad names from a list of good names
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-15-2009, 01:39 PM
  7. Replies: 0
    Last Post: 11-19-2005, 11:15 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