VBA how to check row numbers whether they are even
15:16 28 Feb 2019

The code functions for invalid part number when checking firstDigit ranges. Now when the code is actually a valid part number I need to check a new set of ranges for whether they are even or odd.

Option Explicit

 Sub PartNumber()

 Dim xCell As Range

 For Each xCell In Range("firstDigit")
 If xCell Like WorksheetFunction.Rept("[A-Z]", Len(xCell)) Then

'I decided to make digits a new sub to make the code look simpler.

   Call Digits
Else
    xCell.Offset(0, 2) = "Invalid Part Number"
   xCell.Offset(0, 2).Interior.Color = vbYellow
End If
Next xCell

End Sub

This is the part where I want to check if it is even or odd

Sub Digits()
Dim xxCell As Range
For Each xxCell In Range("productNumbers")
If xxCell = Even Then
    xxCell.Offset(0, 1) = "Ours"
    Else
    xxCell.Offset(0, 1) = "Theirs"
End if
Next xxCell
End Sub
excel vba