I am looking to build a Analyzer that counts Monthly Dollar Values (columns dating from June2017 to CurrentDate, across 14 different rows) inside of a cell that is Green(Paid) and Orange(Unpaid). I would like to put a COUNTIF Cell at the end of each row and have it tally the cells that are either orange or
So far I've found counting the number of cells that are colored or the number of cells containing a letter. I tried manipulating the code below but I could not figure it out.
Function CountCcolor(range_data As range, criteria As range) As Long
Dim datax As range
Dim xcolor As Long
xcolor = criteria.Interior.ColorIndex
For Each datax In range_data
If datax.Interior.ColorIndex = xcolor Then
CountCcolor = CountCcolor + 1
End If
Next datax
End Function
I have received the #NAME! issue in Excel as well as the cell not counting the numbers but instead how many cells are Green or Orange