Error 13 - Type Mismatch

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,404
Office Version
  1. 2016
Platform
  1. Windows
I'm getting an error 13 Type Mismatch on the following line but I have no idea why, if anyone can assist?

Code:
If InStr(cell.Value, "P.T.") Or InStr(cell.Value, "Temp Gt") Or cell.Offset(0, 9).Value = "AP" Or cell.Offset(0, 9).Value = "A/Gt" <> 0 Then
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
What are you trying to do with the
Code:
<>0
at the end of that code?
 
Upvote 0
Effectively I'm trying to capture if the Cell value matches any of those values....
 
Upvote 0
Try removing it & see what happens.
 
Upvote 0
I think you need to split that expression up a bit, or at least stick some parentheses in there.
 
Upvote 0
Tried your suggestion Fluff but still get the error
 
Upvote 0
In that case what is the content of Cell & Cell.offset(,9), when you get the error?
It may be that you have a formulaic error in one of them.
 
Upvote 0
Thanks Fluff - the value of that cell can actually be anything at all, but is usually a mix of numbers and text and it is populated from a data connection, so there is no formula in there.....or have I misunderstood what you mean?
 
Upvote 0
No, you haven't misunderstood, but you haven't said what the actual values are when the error occurs.
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,580
Members
449,089
Latest member
Motoracer88

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