+ Reply to Thread
Results 1 to 7 of 7

And...

  1. #1
    Darin Kramer
    Guest

    And...



    Should be easy but its not working for some reason!

    Cell a1 will display either a "w","x","y","z" depending on a users
    choice elsewhere.

    In a2 I need to say if a1 ="w", put cell reference a5, if a1="x", put
    cell reference a6, if a1="Y", put cell reference a7, if a1="z", put cell
    reference a8.

    Thanks

    D

    *** Sent via Developersdex http://www.developersdex.com ***

  2. #2
    Bob Phillips
    Guest

    Re: And...

    VBA?

    Select Case Range("A1").Value
    Case "w": Range("A2").Formula = "=A5"
    Case "x": Range("A2").Formula = "=A6"
    Case "y": Range("A2").Formula = "=A7"
    Case "z": Range("A2").Formula = "=A8"
    End Select

    --
    HTH

    Bob Phillips

    "Darin Kramer" <[email protected]> wrote in message
    news:O%[email protected]...
    >
    >
    > Should be easy but its not working for some reason!
    >
    > Cell a1 will display either a "w","x","y","z" depending on a users
    > choice elsewhere.
    >
    > In a2 I need to say if a1 ="w", put cell reference a5, if a1="x", put
    > cell reference a6, if a1="Y", put cell reference a7, if a1="z", put cell
    > reference a8.
    >
    > Thanks
    >
    > D
    >
    > *** Sent via Developersdex http://www.developersdex.com ***




  3. #3
    Darin Kramer
    Guest

    Re: And...

    Hi Bob...

    Thanks... Is it possible to do out of VBA? so that user does not have to
    run a macro to see a result...

    Kind REgards

    Darin

    *** Sent via Developersdex http://www.developersdex.com ***

  4. #4
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    =IF(A1="w",A5,IF(A1="x",A6,IF(A1="y",Ay,IF(A1="z",A8,""))))

    Mangesh



    In a2 I need to say if a1 ="w", put cell reference a5, if a1="x", put
    cell reference a6, if a1="Y", put cell reference a7, if a1="z", put cell
    reference a8.

  5. #5
    paul
    Guest

    Re: And...

    do you mean in cell a2
    =if(a1="w",a5,if(A1="x",A6,if(A1="y",A7,if(A1="z",A8,""))))
    --
    paul
    remove nospam for email addy!



    "Darin Kramer" wrote:

    > Hi Bob...
    >
    > Thanks... Is it possible to do out of VBA? so that user does not have to
    > run a macro to see a result...
    >
    > Kind REgards
    >
    > Darin
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    >


  6. #6
    Bob Phillips
    Guest

    Re: And...

    An alternative

    =OFFSET(A1,LOOKUP(A1,{"w",4;"x",5;"y",6;"z",7}),0)

    --
    HTH

    Bob Phillips

    "paul" <[email protected]> wrote in message
    news:[email protected]...
    > do you mean in cell a2
    > =if(a1="w",a5,if(A1="x",A6,if(A1="y",A7,if(A1="z",A8,""))))
    > --
    > paul
    > remove nospam for email addy!
    >
    >
    >
    > "Darin Kramer" wrote:
    >
    > > Hi Bob...
    > >
    > > Thanks... Is it possible to do out of VBA? so that user does not have to
    > > run a macro to see a result...
    > >
    > > Kind REgards
    > >
    > > Darin
    > >
    > > *** Sent via Developersdex http://www.developersdex.com ***
    > >




  7. #7
    Darin Kramer
    Guest

    Re: And...



    Thanks all!

    *** Sent via Developersdex http://www.developersdex.com ***

+ 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