I am getting the following msg from compiler
"Run-time error '13': Type mismatch"
and it's highlighting the following line:
If Cells(k, j + 1) = "T1" ...
I don't understand why I am getting this error. The cells that it is looping through are all text format. Can someone explain how to correct this code? Note that this is only a portion of the program.
Sub TestSub2()
Dim i As Integer, j As Integer, k As Integer, k2 As Integer
'i ->tier table row counter
'j ->column counter
'k ->"Reading Date" and "PM Executed?" table row counter
'---TIER 1 TABLE---
k = 102
k2 = 84
For i = 21 To 35
k = k + 1
k2 = k2 + 1
For j = 26 To 148
If Cells(k, j + 1) = "T1" Or "T1, T2" Or "T2, T1" Or "T1, T3" Or "T3, T1" Or "T1, T2, T3" Or "T1, T3, T2" Or "T2, T1, T3" Or "T2, T3, T1" Or "T3, T1, T2" Or "T3, T2, T1" Then
'then
Cells(i, 8) = Cells(i, j) And Cells(i, 9) = Cells(k2, j + 1)
End If
Next j
Next i