Thread: Type Mismatch
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Type Mismatch

Teresa,

I tidied it up a bit and that worked fine for me

With Worksheets("sheet1")
If Application.Match(.Cells(i, 2), _
wipwkbk.Worksheets("Live").Range("b1:b18"), 0) 0 Then
.Cells(i, 1).EntireRow.Copy
Destination:=Worksheets("Sheet7").Cells(j, 1)
End If
End With

What have you got in wipwkbk, i and j variables?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
I get a type mismatch with the first code and still doesnt run with

second,
clearly missing something, help is much appreciated

with worksheets("sheet1")
If Application.match(.Cells(i, 2),
wipwkbk.Worksheets("Live").Range("b1:b18"), 0) 0 Then
.Cells(i, 1).EntireRow.Copy
Destination:=Worksheets("Sheet7").Cells(j,1)

OR

with worksheets("sheet1")
If Application.match(.Cells(i, 2),
wipwkbk.Worksheets("Live").Range("b1:b18"), 0) Then
.Cells(i, 1).EntireRow.Copy

Destination:=Worksheets("Sheet7").Cells(j,1)