+ Reply to Thread
Results 1 to 3 of 3

Codes for Text in Excel Worksheet

Hybrid View

  1. #1
    Registered User
    Join Date
    06-05-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003
    Posts
    2

    Codes for Text in Excel Worksheet

    Hi, hopefully someone can help me!

    I was hoping to devise a way to be able to enter a code to display a certain word in a worksheet.

    For example.

    Entering for example 10 would return blue
    Entering for example 11 would return green
    Entering for example 15 would also return green


    However for statistical purposes it was hoped that I would be able to count the number of times 15 or 11 was entered and not the word green.

    I have attempted to find this out through many forums however cannot seem to figure it out. Hopefully someone could lend a hand!

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Codes for Text in Excel Worksheet

    Hello,

    set up a table in your workbook that lists the codes and the text side by side in two separate columns

    A   B
    10 blue
    11 green
    15 green
    In another area of the spreadsheet, for example in D1 enter the number. In E1 enter this Vlookup formula

    =Vlookup(D1,$A$1:$B$3,2,false)

    E1 will now contain the text. Copy E1 down and enter more codes in column D.

    You can then perform a count of codes in column D to find out how often each code has been used.

    This approach can be refined with error trapping to avoid N/A errors in column E if the cell in column D is empty.

    cheers,
    Last edited by teylyn; 06-05-2011 at 06:47 AM. Reason: broken 'e' key.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Codes for Text in Excel Worksheet

    You could use the CHOOSE FUNCTION if your numbers are 1 to 29
    Last edited by royUK; 06-05-2011 at 01:17 PM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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