+ Reply to Thread
Results 1 to 7 of 7

How do I replace the number values with corresponding text ?

  1. #1
    Registered User
    Join Date
    11-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    How do I replace the number values with corresponding text ?

    Hi all !!

    Say I have a column of 1's and 2's


    and I want to replace all the 1's for 'cat', and all the 2's for 'dog'.

    On the second sheet I have a reference table:

    1 cat
    2 dog

    Which formula should I use and how?


    I've tried vlookup, but that doesn't seem to work because of circular error since I want the value returned to replace the reference..


  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: How do I replace the number values with corresponding text ?

    Hi

    to change the value of a cell that way you'll need VBA

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How do I replace the number values with corresponding text ?

    Or use 'Find and Replace' (Ctrl-H)
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Registered User
    Join Date
    11-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How do I replace the number values with corresponding text ?

    Appreciate your suggestion.

    But I can't use the find and replace, the spreadsheet is huge, and growing with way too many variables.

    I need a formula.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How do I replace the number values with corresponding text ?

    Hi,

    Not sure I understand. Can you explain a bit more why you can't use Find and Replace?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Registered User
    Join Date
    11-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How do I replace the number values with corresponding text ?

    Sorry maybe the example I gave was too simplifying.

    The spreadsheet is a data survey with more than 50 questions.

    The way the survey was designed was to return a different number for every answer (label) . What I am trying to do is replace all the numbers for their labels. So there's more than one column, and for every column the numbers correspond to a different label. The spreadsheet is also growing continuously, so find and replace would be very time consuming..
    Last edited by paul_drive; 11-22-2013 at 01:41 PM.

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How do I replace the number values with corresponding text ?

    Maybe this will work for you

    In B1

    =IF(A1=1,"Cat","Dog")

    A
    B
    1
    1
    Cat
    2
    1
    Cat
    3
    2
    Dog
    4
    1
    Cat
    5
    2
    Dog
    6
    2
    Dog
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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] Replace text number with some other number based on the sheet
    By amandeepsharma89 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2013, 09:52 PM
  2. Replace various number values in cells with a text string
    By tommygray in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2013, 05:35 AM
  3. Compare Text, Replace Number
    By sglick in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2007, 05:04 PM
  4. Replace a number with text
    By Candy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-03-2005, 01:05 PM
  5. [SOLVED] Replace Number with Text using Macro
    By Carter68 in forum Excel General
    Replies: 3
    Last Post: 04-19-2005, 04: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