+ Reply to Thread
Results 1 to 8 of 8

if cell d5 says a then d6 will show 1 etc

  1. #1
    Registered User
    Join Date
    06-14-2006
    Posts
    1

    Unhappy if cell d5 says a then d6 will show 1 etc

    how can i get a multiple answers from one cell to another.

    Example my output cell will be d6
    if cell d5 says hello then d6 will say 100
    if cell d5 says help then d6 will say 300
    if cell d5 says test then d6 will say 500
    if cell d5 says bye then d6 will say 700
    etc..


    i got one but its only for two answers, i need at least 20
    =IF(A1="Pass",100,IF(A1="Fail",0,""))

    Please help !!!!!!!

  2. #2
    Forum Contributor
    Join Date
    06-01-2006
    Posts
    324
    Set up an array somewhere, say F1 to G4:

    F G
    Hello 100
    Help 300
    Test 500
    Bye 700

    Then do the following Formula at D6

    =VLOOKUP(D5,F1:G4,2)

    How you can expend your conditions without nesting a HUGE amount of IFs
    Google is your best friend!

  3. #3
    Michael M
    Guest

    RE: if cell d5 says a then d6 will show 1 etc

    Moh
    Have a look at creating a VLOOKUP table
    HTH
    Michael M


    "Moh" wrote:

    >
    > how can i get a multiple answers from one cell to another.
    >
    > Example my output cell will be d6
    > if cell d5 says hello then d6 will say 100
    > if cell d5 says help then d6 will say 300
    > if cell d5 says test then d6 will say 500
    > if cell d5 says bye then d6 will say 700
    > etc..
    >
    >
    > i got one but its only for two answers, i need at least 20
    > =IF(A1="Pass",100,IF(A1="Fail",0,""))
    >
    > Please help !!!!!!!
    >
    >
    > --
    > Moh
    > ------------------------------------------------------------------------
    > Moh's Profile: http://www.excelforum.com/member.php...o&userid=35434
    > View this thread: http://www.excelforum.com/showthread...hreadid=552060
    >
    >


  4. #4
    Max
    Guest

    Re: if cell d5 says a then d6 will show 1 etc

    One way is to use VLOOKUP
    (with the 4th param set to zero for exact match)

    First, set up a reference table array
    in say: Sheet1's cols A and B, eg:

    hello 100
    help 300
    test 500
    bye 700
    etc

    Then in any other sheet, we could use:
    in D6: =VLOOKUP(D5,Sheet1!$A:$B,2,0)

    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---
    "Moh" wrote:
    > how can i get a multiple answers from one cell to another.
    >
    > Example my output cell will be d6
    > if cell d5 says hello then d6 will say 100
    > if cell d5 says help then d6 will say 300
    > if cell d5 says test then d6 will say 500
    > if cell d5 says bye then d6 will say 700
    > etc..
    >
    >
    > i got one but its only for two answers, i need at least 20
    > =IF(A1="Pass",100,IF(A1="Fail",0,""))
    >
    > Please help !!!!!!!
    >
    >
    > --
    > Moh
    > ------------------------------------------------------------------------
    > Moh's Profile: http://www.excelforum.com/member.php...o&userid=35434
    > View this thread: http://www.excelforum.com/showthread...hreadid=552060
    >
    >


  5. #5
    Max
    Guest

    Re: if cell d5 says a then d6 will show 1 etc

    > in D6: =VLOOKUP(D5,Sheet1!$A:$B,2,0)

    Perhaps better with an error trap:
    in D6: =IF(D5="","",VLOOKUP(D5,Sheet1!$A:$B,2,0))
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---

  6. #6
    Ragdyer
    Guest

    Re: if cell d5 says a then d6 will show 1 etc

    You might also wish to include all your choices within the formula itself:

    In D6 enter:

    =LOOKUP(D5,{"bye","hello","help","test";700,100,300,500})

    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Moh" <[email protected]> wrote in message
    news:[email protected]...
    >
    > how can i get a multiple answers from one cell to another.
    >
    > Example my output cell will be d6
    > if cell d5 says hello then d6 will say 100
    > if cell d5 says help then d6 will say 300
    > if cell d5 says test then d6 will say 500
    > if cell d5 says bye then d6 will say 700
    > etc..
    >
    >
    > i got one but its only for two answers, i need at least 20
    > =IF(A1="Pass",100,IF(A1="Fail",0,""))
    >
    > Please help !!!!!!!
    >
    >
    > --
    > Moh
    > ------------------------------------------------------------------------
    > Moh's Profile:

    http://www.excelforum.com/member.php...o&userid=35434
    > View this thread: http://www.excelforum.com/showthread...hreadid=552060
    >



  7. #7
    Moh
    Guest

    Re: if cell d5 says a then d6 will show 1 etc

    this is something im looking for. the thing is all the product are going to
    be in 1 cell in a drop down list (d5) then in d6 whatever is select from d5
    will give me an answer.

    This is what i tried with your help but it returns with #N/A
    =LOOKUP(D5,{"Fusion","Openzone","Featureline 1 Year","Voip";15,35,5,78})
    --
    please can you help... its urgent


    "Ragdyer" wrote:

    > You might also wish to include all your choices within the formula itself:
    >
    > In D6 enter:
    >
    > =LOOKUP(D5,{"bye","hello","help","test";700,100,300,500})
    >
    > --
    > HTH,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    > "Moh" <[email protected]> wrote in message
    > news:[email protected]...
    > >
    > > how can i get a multiple answers from one cell to another.
    > >
    > > Example my output cell will be d6
    > > if cell d5 says hello then d6 will say 100
    > > if cell d5 says help then d6 will say 300
    > > if cell d5 says test then d6 will say 500
    > > if cell d5 says bye then d6 will say 700
    > > etc..
    > >
    > >
    > > i got one but its only for two answers, i need at least 20
    > > =IF(A1="Pass",100,IF(A1="Fail",0,""))
    > >
    > > Please help !!!!!!!
    > >
    > >
    > > --
    > > Moh
    > > ------------------------------------------------------------------------
    > > Moh's Profile:

    > http://www.excelforum.com/member.php...o&userid=35434
    > > View this thread: http://www.excelforum.com/showthread...hreadid=552060
    > >

    >
    >


  8. #8
    Max
    Guest

    Re: if cell d5 says a then d6 will show 1 etc

    "Moh" wrote:
    > This is what i tried ... but it returns with #N/A
    > =LOOKUP(D5,{"Fusion","Openzone","Featureline 1 Year","Voip";15,35,5,78})


    Think the lookup_vector** needs to be sorted in ascending order "A-Z",
    viz. try it in D6 as:
    =LOOKUP(D5,{"Featureline 1 Year","Fusion","Openzone","Voip";5,15,35,78})

    **the part: {"Fusion","Openzone","Featureline 1 Year","Voip"; ...

    But perhaps a less ambiguous way is to use vlookup with 4th param set to
    zero/FALSE for an exact match (as suggested earlier).

    Here's an adaptation which suits your context ..

    In D6:
    =IF(D5="","",VLOOKUP(D5,{"Fusion",15;"Openzone",35;"Featureline 1
    Year",5;"Voip",78},2,0))

    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---

+ 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