Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Excel VBA/formula direction

  1. #1
    New Member
    Join Date
    May 2002
    Location
    Home
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi all:

    Thanks for all the great tips. I did not have any luck with the search feature so I thought I would post my question:

    I need to have a macro (or formula) that will change an entered value to a value found in a table (or listed in the macro).

    Example:

    User puts types '1024' into a cell, and when the user changes cells (completes the entry), it is changed to 'ABCD'

    Please let me know if I can provide any better detail.

    Thanks!

  2. #2
    Board Regular zacemmel's Avatar
    Join Date
    Apr 2002
    Location
    Redmond, WA
    Posts
    636
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Let's say they enter that into cell A1 and the table is on the same page in B1:C10.

    B1 = 1024
    C1 = ABCD

    I don't know what kind of event you want to trigger this, but try this:

    range("b1").formula = "=vlookup(" & range("b1").value & ", B1:C10, 2,0)"

  3. #3
    New Member
    Join Date
    May 2002
    Location
    Home
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Awesome, Thanks for the Help! Your great. Just that helps me a lot!

    however, I another twist if I may:

    how can I do the same thing but have the list(table) defined within the macro?


  4. #4
    New Member
    Join Date
    Apr 2002
    Posts
    48
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-02 14:45, eviljamk55 wrote:
    Awesome, Thanks for the Help! Your great. Just that helps me a lot!

    however, I another twist if I may:

    how can I do the same thing but have the list(table) defined within the macro?

    How about using something like:

    Select Case Range("A1").Formula
    Case "1024"
    Range("A1").Formula= "ABCD"
    Case "1025"
    Range("A1").Formula = "EFGH"
    Case Else
    End Select



    [ This Message was edited by: MT_Shanachie on 2002-05-02 15:05 ]

    [ This Message was edited by: MT_Shanachie on 2002-05-02 15:36 ]

    [ This Message was edited by: MT_Shanachie on 2002-05-02 15:37 ]

  5. #5
    New Member
    Join Date
    May 2002
    Location
    Home
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thank you. I have not had a chance to try it, but I am sure it is better than what I have. Once Again, Thank you!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •