Type Mismatch

Barbarte

Board Regular
Joined
Dec 13, 2006
Messages
125
Hi everyone,

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. :roll:

the error happens here:

Code:
 Else
        
        If Cells(14, 11).Value = "COPYRIGHT CONTROL" Or "*** Public Domain Work ***" Then

thanks,

Paul.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Try This -

Code:
If Cells(14, 11).Value = "COPYRIGHT CONTROL" Or Cells(14, 11).Value = "*** Public Domain Work ***" Then

DP
 
Upvote 0

Forum statistics

Threads
1,222,312
Messages
6,165,278
Members
451,949
Latest member
bovacik

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top