Results 1 to 16 of 16

Excel Problem Using Case and worksheet change

Threaded View

  1. #1
    Registered User
    Join Date
    02-25-2008
    Location
    UK
    Posts
    8

    Excel Problem Using Case and worksheet change

    Hello,
    I'm having problems programming a template that I am developing. I am some what a cross between a novice and intermediate. Most of what I know has been self taught. I'll try to articulate my problem.

    I am working with to column ranges where data is selected using the built in validation drop list in excel.
    2) I have the worksheet change vb function that runs a macro if something is changed on the sheet.
    3)the code to be run should check both column ranges. If the text in each cell meets acriteria then put a value in an adjacent field.
    4) I have never used case statements before and was told its best to use these because of the various permutations that need to be performed.

    E.G

    Range 1 = "performanceInd"
    Range 2 = "behaviourInd"

    (there is a column between both ranges not sure if this makes a difference)

    the macro is basically saying this
    Select Case Range("performanceInd:behaviourInd").Text

    'if the user selects outstanding and outstanding from both ranges then set prprating to "A"....
              Case "outstanding:outstanding"
              Range(prprating).Select
                     Range("prprating").Value = "A"
              'Case Else
                     'Range("prprating").Text = ""
             End Select
    End Sub
    'its saying if an individual gets a performance marking of outstanding and a behavioural marking of outstanding then give marking "A" in an adjacent cell to the individual.

    I can send file if it helps although I think I have provided enough info. Grateful for some help. Thanks a million in advance.
    Last edited by royUK; 02-25-2008 at 08:53 AM.

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