Thread
:
Countifs between a certain value
View Single Post
#
2
Posted to microsoft.public.excel.worksheet.functions
Claus Busch
external usenet poster
Posts: 3,872
Countifs between a certain value
Hi,
Am Fri, 3 Jun 2016 06:26:27 -0700 (PDT) schrieb
:
I need to count the values between a set value, and then only show how many times this count was more than 5. The values counted is variable only the between value is set
This is in the same column lets say from a1. DD is your set value, in the below example my answer should be 2 ( there are only 2occurrences where there are more than 5 data sets between the DD parameter)
try it with an UDF:
Function CntSeries(myRng As Range) As Long
Dim First As Long, i As Long
First = 1
For i = 1 To myRng.Rows.Count
If Cells(i, myRng.Column) = "DD" And i - First = 6 Then
CntSeries = CntSeries + 1
First = i
End If
Next
End Function
Regards
Claus B.
--
Windows10
Office 2016
Reply With Quote
Claus Busch
View Public Profile
Find all posts by Claus Busch