Hi everyone,
can anyone tell me why I'm getting this error:
Runtime Error '13':
Type mismatch
in this code:
I've been trying for about 40 minutes to figure it out now.
no doubt its probably something ridiculously simple.
the error happens here:
thanks,
Paul.
can anyone tell me why I'm getting this error:
Runtime Error '13':
Type mismatch
in this code:
Code:
Sub FixZeros2()
Dim rowno14 As Long
Dim Zero As Range
Dim OneHundred As Range
Cells(2, 33).Value = "0.00"
Cells(2, 34).Value = "100.00"
Set Zero = Cells(2, 33)
Set OneHundred = Cells(2, 34)
Workbooks("DTmacTest").Activate
Sheets("DT").Select
rowno14 = 2
Do Until Cells(rowno14, 13) = ""
If Cells(14, 11).Value = "COPYRIGHT CONTROL" _
And Cells(rowno14, 14).Value = Cells(rowno14 + 1, 14).Value _
And Cells(rowno14, 5).Value = Cells(rowno14 + 1, 5).Value Then
Cells(rowno14, 13).Value = Zero
Else
If Cells(14, 11).Value = "COPYRIGHT CONTROL" Or "*** Public Domain Work ***" Then
Cells(rowno14, 13).Value = OneHundred
End If
End If
rowno14 = rowno14 + 1
Loop
End Sub
I've been trying for about 40 minutes to figure it out now.
no doubt its probably something ridiculously simple.
the error happens here:
Code:
Else
If Cells(14, 11).Value = "COPYRIGHT CONTROL" Or "*** Public Domain Work ***" Then
thanks,
Paul.