Thread
:
Tallying Votes in Excel
View Single Post
#
2
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
Tallying Votes in Excel
This macro will do it
Sub stopwhen()
mc = "f"
lr = Cells(Rows.Count, mc).End(xlUp).Row
For Each c In Range(Cells(2, mc), Cells(lr, mc))
If ucase(c) = "YES" Then myc = myc + 1
If myc = 60 Then
MsgBox c.Address & "=" & myc
c.Offset(1).Interior.ColorIndex = 36
Exit For
End If
Next
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Noah Negrin" <Noah
wrote in message
...
When conducting a vote and tallying results in excel, the two responses
are
€˜YES and €˜NO. If 100 people are going to vote, and it requires 60 €˜YES
responses for the vote to pass, how can I program excel to count the €˜YES
votes and do something when it hits 60? If I could have it highlight the
cell below the voting results Green or something, that would be perfect.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett