how to get data validated lists in excel to score

I want to be able to use a drop down that I create in Excel using data validation (list) to assign a score to the cell next to the drop down in VBS.  How would I do that.  See file attached.
QCATScience.xls
Dier02Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dlmilleCommented:
For example, put scores in H13:H23?  You can do that with VBA, but why not a formula?

How would you like to score?  Give an example of a drop down selection and relative score?  Do you have a table of scores based on drop-down values?  That would need to be provided in the spreadsheet, somewhere...

Dave
Dier02Author Commented:
I suppose you could do a drop down for the score but I was thinking it would be easier if you dropped down for the descrip[tor - which is already in the file - and VBA scored according to that descriptor.
Dier02Author Commented:
When you get to the end of the file- after filing in all the drop downs the idea is that the aggregated score is turned into an A,B,C,D or E.  Thats the end view.  At this point I just wanted to have only one drop down to get the score and the scoring would be 1 to 10.
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

dlmilleCommented:
Ok.  Let's back up a bit.  The user selects a dropdown value from the list.  As a result of that dropdown, a score is tallied, somewhere.  And then, for the entire sheet, there's a score made up of all the scores in the sheet, correct?
Dier02Author Commented:
Yes, and then the final score is converted to an A,B,C,D or E.
dlmilleCommented:
GREAT.  You need to provide more information, however.  Please pull up the worksheet you posted, and make sample entries, then beside the sample entries, notate how that entry would have been scored.  I cannot help you without understanding how you would score each and every response possible.  Feel free to create a table of responses and their respective scores on another tab with your example.  From that, it should move quickly.

Cheers,

Dave
dlmilleCommented:
Maybe I'm not being clear enough.  Does every dropdown in the sheet result in a score, or is it just those at the bottom of the sheet?

Regardless, you need to identify which need a score and what the score would be for each possible response in the dropdown.  You can do that by creating a table of the possible responses (re: dropdowns) and score right beside it.  From that, a score could automatically be tallied, etc...

Dave
Dier02Author Commented:
Will do and sesend, thanks Dave.
Dier02Author Commented:
Just sent some code that is sort of along that road.  Will score sheet and resend.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRange As Range, TestRange As Range
Set myRange = Range("H13:H23")
Set TestRange = Intersect(Target, myRange)
If TestRange Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
    Select Case Target.Value
        Case "how hard I blow"
            Target.Offset(0, 1).Value = 5
            
            
        Case "Bob"
            Target.Offset(0, 1).Value = 2
            
            
        Case "Dave"
            Target.Offset(0, 1).Value = 3
           
            
            Case 4
            Target.Offset(0, 1).Value = 4
            
            
            
        Case 5
            Target.Offset(0, 1).Value = 5
            
            
        Case 6
            Target.Offset(0, 1).Value = 6
            
            
            Case 7
            Target.Offset(0, 1).Value = 7
            
            
            
        Case 8
            Target.Offset(0, 1).Value = 8
           
            
        Case 9
            Target.Offset(0, 1).Value = 9
            
            
            Case 10
            Target.Offset(0, 1).Value = 10
            
            
            
        
            
    End Select
End Sub

Open in new window

Dier02Author Commented:
Here is the scored file - the hyperlink to scores shows the scoring for each.
QCATScience.xls
Dier02Author Commented:
Dave?
Dier02Author Commented:
How is it going?
dlmilleCommented:
Sorry, I've been out a couple days.  This was a good start, but incomplete as to table of responses and score.  I could perhaps provide a sample solution, moving downward a bit on the questionnaire, to demonstrate what I'm talking about.  But, to do the entire questionnaire is a big job, from what's been provided so far.

I'll start working on it and give you a partial to demonstrate how to do this, and submit something this weekend.  Will that work for you?

Dave
dlmilleCommented:
Ok - there's no need to do the VBA code you provided.

Here's a starting sample so you can see how its done.

I did two score areas (see yellow highlighting on attached workbook), to one side or the other of the drop-downs (these scores could all be moved to the right of the worksheet, even out of view.  Keeping them close as you have so we can make this happen.

All your data validation lists should be off tables like you created.  A VLOOKUP against the drop down result and the data tables (2 columns, match on left side, score on right) is created to capture the score.  Assuming you move all the scores to the right side of the sheet, it should be very easy to tabulate from that point.

As you may be able to see, there's no need to capture a worksheet_change event to make this happen - simple drop downs and vlookups are all that are needed.  You can put error checking in the vlookups to capture as well.. e.g,   =IF(ISERROR(VLOOKUP(whatever)),0,VLOOKUP(whatever))

Let me know if this helps.  Perhaps you can work this a bit and then flag me back when you need assistance?  PS - I also suggest eventually moving the scoring tables to another worksheet and create range names on top of each one - then you could use the range names for your data validation and vlookups.  Either way, your tables with scores (may I suggest) should be structured more, so they're organized well, blocked, etc., to make them easy to find and reference.

Please see attached.

Cheers,

Dave
QCATScience.xls

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dlmilleCommented:
just post back here if you have any issues.

Dave
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.