Sub RunMe()
Dim x, y As Integer, mRange As Range
Set mRange = Application.InputBox("Select range", Type:=8)
For Each cell In mRange
If cell.Interior.Pattern = xlNone Then x = x + 1
If cell.Value <> vbNullString Then y = y + 1
Next cell
If x = 5 And y = 5 Then MsgBox ("5")
End Sub