I cannot for the life of me figure out why I am getting a mismatch in the following code. I'm trying to have it just count the number of cells in a range with two digits. I highlighted the spot where I'm getting a mismatch error:
Thanks in advance for the help!
Code:
lastrow = foswork.Cells(foswork.Rows.Count, 2).End(xlUp).row
For x = 1 To 5
Set rng = foswork.Range(foswork.Cells(1, x + 5), foswork.Cells(lastrow, x + 5))
staffing.Cells(x + 4, (3 * i) - 1) = _
Application.WorksheetFunction.SumProduct(--[COLOR=#ff0000](Len(rng)[/COLOR] = 2)) - _
Application.WorksheetFunction.CountIfs(rng, "SB")
Next x
Thanks in advance for the help!