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?
 
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
0
 
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
0
 
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.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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.
0
 
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?
0
 
Dier02Author Commented:
Yes, and then the final score is converted to an A,B,C,D or E.
0
 
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
0
 
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
0
 
Dier02Author Commented:
Will do and sesend, thanks Dave.
0
 
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

0
 
Dier02Author Commented:
Here is the scored file - the hyperlink to scores shows the scoring for each.
QCATScience.xls
0
 
Dier02Author Commented:
Dave?
0
 
Dier02Author Commented:
How is it going?
0
 
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
0
 
dlmilleCommented:
just post back here if you have any issues.

Dave
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.