0

I am looping through a set/column of data that I'd want to count based on color and the number. Here is a line example of the code I am using.

CountColorNumber = Application.WorksheetFunction.CountIfs(Range("NamedRange").Columns(2).Interior.ColorIndex, ">0", Range("NamedRange").Columns(2).Interior.ColorIndex, Range("NamedRange").Cells(i, 2))

I am getting object required error, and I'm not sure if I need to define variables or whatnot. I was able to run this same line of code by just removing the part that looks into the interior color. Can someone help with fixing the code count the numbers of entries in the column based on 2 conditions - color and number?

SPN
  • 1

0 Answers0