View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
stevebriz stevebriz is offline
external usenet poster
 
Posts: 195
Default Macro stops @ row 300 with count... how?

You need to make sure the range includes past 300 when you call this
function.

wrote:
When I change the contents of column 'K' for example to Pass. It
updates a value up top where I have Pass / Fail / To Do / Total.

Once I reach row 300, the macro stops firing and I can change the cells
for K:301 and further down, but nothing updates.

When I hover over the TR.Count below it reads Count = 300. How do I
change this?

Thanks!


Function GetPass(TR As Range) As Integer
Dim i As Integer, c As Integer
For i = 1 To TR.Count
If Trim(LCase(TR.Cells(i, 1))) = "pass" Then
c = c + 1
End If
Next i
GetPass = c
End Function