+ Reply to Thread
Results 1 to 3 of 3

read value and compare from list in VBA

  1. #1
    Registered User
    Join Date
    07-18-2011
    Location
    Washington, DC
    MS-Off Ver
    Excel 2007
    Posts
    24

    read value and compare from list in VBA

    I need to write an that reads the value from a cell that contains a drop down list. If item1 is selected I need to perform one calculation. if item2 is selected I need to do another, and so on.

    Can someone help?

    Thank you

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: read value and compare from list in VBA

    hi

    If you use validation you can use following code to return index of selected value.
    Then you will be able to build Select Case or if, elseif to define what should be calculated

    Please Login or Register  to view this content.
    Best Regards
    MaczaQ

  3. #3
    Registered User
    Join Date
    07-18-2011
    Location
    Washington, DC
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: read value and compare from list in VBA

    Thanks for you help. I'm sorry, but I am still not sure what to do. Would you mind showing me exactly how I would use the function below?

    Thanks.

+ 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