BooleanCount

Counts how many values are True (or anything) in an array of boolean values
Caller can pass any array, not necessarily boolean, then pass the value that needed to be checked against, the function will return how many items in that array matching that value.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function BooleanCount(BoolArray, Optional Matching = True)
    ' Counts how many values are True (or False) in an array of boolean values
    '
    Rett = 0
    For Each Bln In BoolArray
        If Bln = Matching Then Rett = Rett + 1
    Next
    BooleanCount = Rett
End Function

BoolArray, Optional Matching = True

Views 96

Downloads 42

CodeID
DB ID

ANmarAmdeen
610
Attachments
Revisions

v1.0

Friday
April
22
2022