+ Reply to Thread
Results 1 to 5 of 5

Create a Formula where using different texts to display a value

  1. #1
    Registered User
    Join Date
    01-11-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Create a Formula where using different texts to display a value

    I would like to create a formula that allows the destination cell display a number depending on a word that is typed in the source cell. The source cell and the destinating cell will remain the same two cells.

    example:A2=IF(A1="WORD1",1.5,0)

    If i type WORD1 in A1 (source cell) then A2 (destination cell) will display 1.5, but how do i make this formula work for a multiple of different words.

    example:A2=IF(A1="WORD1",1.5,0 IF(A1="WORD2",3.0,0 IF(A1="WORD3",2.5,0)))

    this formula doesn't work, but is basically what i am looking for the formula to do - WORD1 displays 1.5, WORD2 displays 3.0, WORD3 displays 2.5 etc where the source cell and the destinating cell remain the same two cells, it is just the word and its value that change

    Thank You
    Last edited by NBVC; 01-11-2010 at 12:07 PM. Reason: subject not discriptive enough

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula's

    Welcome to the forum,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Formula's

    Sorry I didn't read the question and missed moderators request
    Last edited by Marcol; 01-11-2010 at 10:27 AM. Reason: I didn't read the question properly

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Create a Formula where using different texts to display a value

    Best way is to setup a lookup table containing the words in one column and the data to return in another column...

    so say you setup a table in X1:Y100

    then, if you are looking to return numbers, then use formula:

    =Sumif($X$1:$X$100,A1,$Y$1:$Y$100)

    else if text to be returned:

    =IF(Isnumber(Match(A1,$X$1:$X$100,0)),Vlookup(A1,$X$1:$Y$100,2,FALSE),0)

  5. #5
    Registered User
    Join Date
    01-11-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Create a Formula where using different texts to display a value

    NBVC, thank you very much. This has worked

+ 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