+ Reply to Thread
Results 1 to 3 of 3

Replace words with numbers based on strict rules

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Replace words with numbers based on strict rules

    Hi there,

    I would like request to solve my problem.

    In A column : i have numbers 1,2,3
    In B column : i have words "dog" "cat" "home"

    *A and B means rules : 1=dog, 2=cat, 3=home

    In C column i have many of : dog dog cat home dog cat home

    I would like to replace words with numbers in column C based on rule described upper.

    Is it possible?

    (Similar make me vlookup - but its oposite, it replace number to word, but i need words in C column replaced to numbers)
    Last edited by xbr088; 06-20-2013 at 09:23 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Replace words with numbers based on strict rules

    You can not use a formula in a cell that you already have a value.. BUT you can hide column C and in Column D to use this formula...

    =IFERROR(INDEX($A$1:$A$100,MATCH(C1,$B$1:$B$100,0)),"")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Replace words with numbers based on strict rules

    Ok solved :-)

    D1 start with : =VLOOKUP(C1;$A$1:$B$3;2;FALSE)

    *BUT: A & B column HAVE TO BE REPLACED (A:"dog" "cat" "home" B:1,2,3)

+ 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