+ Reply to Thread
Results 1 to 4 of 4

Else If

  1. #1
    Registered User
    Join Date
    07-10-2005
    Posts
    7

    Question Else If

    Is there a function which will check in a specified cell for a number (should be from 1-10) and return a specific value based what number it found in that cell?

    Ex.
    IF(A1=1,"text1")
    IF(A1=2,"text2")
    IF(A1=3,"text3")
    IF(A1=4,"text4")
    IF(A1=5,"text5")
    IF(A1=6,"text6")
    IF(A1=7,"text7")
    IF(A1=8,"text8")
    etc...

  2. #2
    Chip Pearson
    Guest

    Re: Else If

    Try

    ="text"&A1

    or

    =CHOOSE(A1,"text1","text2","text3")

    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "mallets123"
    <[email protected]> wrote
    in message
    news:[email protected]...
    >
    > Is there a function which will check in a specified cell for a
    > number
    > (should be from 1-10) and return a specific value based what
    > number it
    > found in that cell?
    >
    > Ex.
    > IF(A1=1,"text1")
    > IF(A1=2,"text2")
    > IF(A1=3,"text3")
    > IF(A1=4,"text4")
    > IF(A1=5,"text5")
    > IF(A1=6,"text6")
    > IF(A1=7,"text7")
    > IF(A1=8,"text8")
    > etc...
    >
    >
    > --
    > mallets123
    > ------------------------------------------------------------------------
    > mallets123's Profile:
    > http://www.excelforum.com/member.php...o&userid=25090
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=515351
    >




  3. #3
    Rajah
    Guest

    Re: Else If

    If you're sure it's going to be between 1 and 10, the CHOOSE function
    will work for up to 29 values. It will give you a #VALUE error if A1
    has a number greater than 10.

    =CHOOSE(A1,"text1","text2","text3","text4","text5","text6","text7","text8","text9","text10")


  4. #4
    RagDyeR
    Guest

    Re: Else If

    You could try this:

    =INDEX({"text1","text2","text3","text4","text5"},A1)

    --

    HTH,

    RD
    =====================================================
    Please keep all correspondence within the Group, so all may benefit!
    =====================================================

    "mallets123" <[email protected]> wrote
    in message news:[email protected]...

    Is there a function which will check in a specified cell for a number
    (should be from 1-10) and return a specific value based what number it
    found in that cell?

    Ex.
    IF(A1=1,"text1")
    IF(A1=2,"text2")
    IF(A1=3,"text3")
    IF(A1=4,"text4")
    IF(A1=5,"text5")
    IF(A1=6,"text6")
    IF(A1=7,"text7")
    IF(A1=8,"text8")
    etc...


    --
    mallets123
    ------------------------------------------------------------------------
    mallets123's Profile:
    http://www.excelforum.com/member.php...o&userid=25090
    View this thread: http://www.excelforum.com/showthread...hreadid=515351



+ 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