Totalling data used in drop down boxes?

  • Thread starter Thread starter ihrod9
  • Start date Start date
I

ihrod9

I am creating a basic diary and have a drop-down box with all of the possible
people who could be booked into a particular day. I select the name from the
drop-down box but is there any way of totalling how many times that user has
been selected from the drop-down box?
 
This assumes your data validation cell in H3, your NAMED list is k1:k??
Right click sheet tab>view code>insert this. Now when the validation is
selected the count for each choice will increase in col L.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$H$3" Then Exit Sub
mrow = Range("mlist").Find(What:=Target, after:=Cells(1, "k"), _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Row
Cells(mrow, "L") = Cells(mrow, "L") + 1
End Sub
 
Hi,

Do you have a single drop down or many (for each day, for example)? Are you
trying to count how many times a given name has been picked from any of these
drop downs or just one? If a name is picked once from a specific dropdown
say for Jan 1, 2009 but you change your mind and clear that name, do you
count it or not?

Do you want to track this between closing and opening the file or just while
the file is open?

Thanks,
Shane Devenshire
 
I've got the desk number (that is what i'm booking in this case) along the
top (A, B, B) i.e desk 1, desk 2, desk 3, then the time down the side in 30
minute blocks (1, 2, 3).

I then have drop down boxes in each of the fields (i.e A1, A2, etc) with the
names of the possible people who can book the desk.

I want to know if I can somehow total how many times that name has been used
from the drop down box in the table if possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top