View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
glenn glenn is offline
external usenet poster
 
Posts: 122
Default Creating a ratings spreadsheet?

Joel,

I am a novice at Excel.

When I create Cell C5 I am going to create a Macro.
=COUNTIF(Scores!$B:$B,"Changed")
=COUNTIF(scores!$C:$5,"Changed") ?
I have tried it several ways and haven't had much success. Am I doing
something wrong? Any is deeply appreciated!
--
Thank You
Glenn


"Joel" wrote:

Using the worksheet change macro I put the scores on a worksheet called SCORES.
Column A is the scores and column B get either "Changed" or "Not Changed".
I assumed the 1st entry will always be a change since there was no previous
data.

When you enter a number in cell C5 the worksheet change function
automaticaly gets called.

the number of chaes in C10 is a formula
=COUNTIF(Scores!$B:$B,"Changed")

The results in C15 is
=SUM(Scores!$A:$A)/C10

Sub worksheet_change(ByVal Target As Range)

If Target.Address = "$C$5" Then
With Sheets("Scores")
LastRow = .Range("A" & Rows.Count).End(xlUp).Row
If LastRow < 1 Or _
Target < "" Then

LastRow = LastRow + 1
End If

.Range("A" & LastRow) = Target.Value
If LastRow = 1 Then
.Range("B1") = "Changed"
Else
If .Range("A" & LastRow) = _
.Range("A" & (LastRow - 1)) Then

.Range("B" & LastRow) = "Not Changed"
Else
.Range("B" & LastRow) = "Changed"
End If
End If
End With
End If

End Sub


"Glenn" wrote:

I would like to know if this is possible? I would like to create a
spreadsheet that would have three calls. first cell C5 as a daily score cell,
then have another cell C10 only add all the daily score and count how many
times there was a change in the score, Then have cell C15 take the total of
cell C10 divide the amount of daily score and come up with a average. If I am
barking up the wrong software can you point me in the right direction.
--
Thank You
Glenn