You can try this UDF: copy and paste to a regular VBA module. You pass it a range, and lower/upper bounds for the small and large dimensions respectively.
Eg: to count all sizes with small side between 8 and 10 and large side between 12 and 14 (inclusive):
=CountSizes(A:A,8,10,12,14)
EDIT: for your specific use case of 8.5x11 or smaller
=countsizes(A:A, 0, 8.5, 0, 11) 'one side btw 0 and 8.5 & one side btw 0 and 11.5
EDIT3: to show how you'd use this from VBA instead of as a UDF, including your second column
Sub Tester()
With ThisWorkBook.Sheets("Pages")
'count only where second column has "Color"
.Range("B1").Value = CountSizes(.Range("A:B"), "Color", 0, 8.5, 0, 11)
End With
End sub
Code:
Function CountSizes(rng As Range, colorType As String, _
smallGE, smallLE, largeGE, largeLE)
Dim tmp, val, v1, v2, small, large, arr, arrVals
Dim num As Long, r As Long, nr As Long
num = 0
arr = rng.Value
nr = UBound(arr, 1)
For r = 1 To nr
val = Trim(arr(r, 1))
If val Like "*x*" Then
arrVals = Split(val, "x")
v1 = Trim(arrVals(0))
v2 = Trim(arrVals(1))
If IsNumeric(v1) And IsNumeric(v2) Then
v1 = CDbl(v1)
v2 = CDbl(v2)
If v1 > v2 Then
small = v2: large = v1
Else
small = v1: large = v2
End If
If small >= smallGE And small <= smallLE And _
large >= largeGE And large <= largeLE Then
If Trim(arr(r, 2)) = colorType Then
num = num + 1
End If
End If
End If
End If
Next r
CountSizes = num
End Function