+ Reply to Thread
Results 1 to 6 of 6

Enter a Number, Get a corresponding Text Value in the Same Cell

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    lancashire, england
    MS-Off Ver
    Excel 2003
    Posts
    3

    Enter a Number, Get a corresponding Text Value in the Same Cell

    If I input a value into cell C12, I want this numerical value to be changed into a persons name. I want to be able to input up to 30 different numerical values in C12. All the names are in another work sheet I have so is it possible to refernece the cells containing the peoples names?

    Example. If the value input into C12=1 then I want the cell to display John Smith (John Smith is the name in Cell B2 in my other work sheet which is entitled "squad numbers") or If the value input into C12=2 then I want the cell to display Steve Jones (Steve Jones is the name in Cell B3 in my other work sheet which is entitled "squad numbers")

    I'm very new to Excel so please take it easy on me !!

    Cheers
    Last edited by NBVC; 02-11-2009 at 03:54 PM. Reason: Adjusted title to suit problem better.

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Possible Data Validation

    It'd be quite easy to enter a value into c12, and have the cell next to it, (or any other cell for that matter) return the corresponding name. Would that work for you?
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  3. #3
    Registered User
    Join Date
    02-11-2009
    Location
    lancashire, england
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Possible Data Validation

    That would be sort of a second prize solution yes. If you could let me have it then great in case nobody can provide the first choice solution or my request isn't possible.

    Many thanks

  4. #4
    Registered User
    Join Date
    11-20-2003
    Location
    Mesquite Texas
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Enter a Number, Get a corresponding Text Value in the Same Cell

    Without using some kind of OLAP software like Essbase, you are not going to be able to easily change the actual value in a cell from the number to the name. However, your 2nd prize solution can be done with a vlookup:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-11-2009
    Location
    lancashire, england
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Enter a Number, Get a corresponding Text Value in the Same Cell

    cheers for that

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Enter a Number, Get a corresponding Text Value in the Same Cell

    If you still want the first prize of having a number change into a matching text value, that's doable, of course. But it comes at a cost.

    This would require a macro running in the background on the sheet called a Worksheet_change macro. Whenever one of these type of macros is running, you lose the ability to do a simple "UNDO" on your sheet, with Edit > Undo or Ctrl-Z on the keyboard. Not everyone is bothered by that.

    If you don't mind losing the UNDO, then post up a sample showing where your numbers and names are listed together for conversion and the forum will help you with your original request.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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