+ Reply to Thread
Results 1 to 11 of 11

Display Comapny name as a Code

  1. #1
    Registered User
    Join Date
    06-12-2018
    Location
    ca, usa
    MS-Off Ver
    2013
    Posts
    5

    Display Comapny name as a Code

    Hello,

    I am pretty sure there will be an answer on this forum, but I am not able find out the term to find out what I need.
    Would you please help me with following function?

    When I enter in Company A in Cell C7, I want it to display the comepany code in cell A1 as "123".


    List of Company and Code

    A = 123
    B = 234
    C = 345
    D = 456
    F = 567
    G = 678

    I know few option using Conditional format or setting the cell option as custom.
    As I know of it has limit of inputs.
    I have like thousands of customer, so cannot use what I list above.

    If you know the thread, please answer the link.

    Thank you for your help.
    Attached Files Attached Files
    Last edited by achobana; 06-14-2018 at 01:41 PM.

  2. #2
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Display Comapny name as a Code

    Hi

    Just confirming you want to enter Company Name in A1 and retrieve EX1 in the same cell? Or was that a typo?

    If it was another cell you can do it with formulas, if it's the same cell it's possibly Macros, unfortunately that's not my strong point. Let me know, thanks.
    If you like my answer please *Add Reputation

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Display Comapny name as a Code

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    06-12-2018
    Location
    ca, usa
    MS-Off Ver
    2013
    Posts
    5
    Quote Originally Posted by MushroomFace View Post
    Hi

    Just confirming you want to enter Company Name in A1 and retrieve EX1 in the same cell? Or was that a typo?

    If it was another cell you can do it with formulas, if it's the same cell it's possibly Macros, unfortunately that's not my strong point. Let me know, thanks.
    In the same cell. Thanks for the help tho.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Display Comapny name as a Code

    Where is the mapping (lookup table) located? This requires a VBA solution and that means we need very specific information.

  6. #6
    Registered User
    Join Date
    06-12-2018
    Location
    ca, usa
    MS-Off Ver
    2013
    Posts
    5

    Re: Display Comapny name as a Code

    Have attached the excel documnet.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Display Comapny name as a Code

    Unable to open file. See message I get below. Capture.JPG

  8. #8
    Registered User
    Join Date
    06-12-2018
    Location
    ca, usa
    MS-Off Ver
    2013
    Posts
    5

    Re: Display Comapny name as a Code

    Alansidman,

    Have re-uploaded the file. Can you please check it again?
    Thank you for your help

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Display Comapny name as a Code

    Here is a VBA solution.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    06-12-2018
    Location
    ca, usa
    MS-Off Ver
    2013
    Posts
    5

    Re: Display Comapny name as a Code

    Quote Originally Posted by alansidman View Post
    Here is a VBA solution.

    Please Login or Register  to view this content.
    Alansidman,

    Thanks for the code. It works Great.
    One more question if you could help
    If I also want to apply the same code in Column D, what should I do?
    I treid changing the "C" to "C:D", but it failed.
    I could make another code, then I will have to run the macro twice so...

    Any suggestion?


    Once again thank you very much for your help.

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Display Comapny name as a Code

    What do you mean you wish to run the same code from column D. Please be more specific as to what you want to happen.

+ 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. vba code about color display
    By yesser in forum Excel General
    Replies: 1
    Last Post: 04-28-2018, 07:55 AM
  2. VBA code to display First and Last Batch No
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-11-2014, 06:14 AM
  3. Replies: 3
    Last Post: 06-28-2012, 12:35 AM
  4. Code doesn't display any result
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2009, 09:48 AM
  5. If number =1 display det code
    By Back2Basics in forum Excel General
    Replies: 6
    Last Post: 02-10-2009, 12:35 PM
  6. Can't display code
    By sheila_d_pratt in forum Excel General
    Replies: 5
    Last Post: 03-07-2005, 04:10 PM
  7. [SOLVED] how do you display a zip code with a leading zero
    By nicole in forum Excel General
    Replies: 2
    Last Post: 01-24-2005, 09:06 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