I don't understand why this generates error 13...Type MisMatch
Dim workingWs, stageWs as Worksheet
Dim dataWsLastRow, dataRngLastRow as Integer
If workingWs.Range("A1:A" & depthRngLastRow).Value2 = stageWs.Range("A1:A" & dataWsLastRow).Value2 Then
targetWs.Range("E8").Value2 = stageWs.Range("I1:I" & dataWsLastRow)
targetWs.Range("E9").Value2 = stageWs.Range("J1:J" & dataWsLastRow)
End If
The If Then statement is throwing an error 13. Thanks!
More context: workingWs col a has 14 unique depth values: say 5000, 50000, etc. each depth value has a different number of values in col i and col j. I'm comparing col a to col a in workingWs and stageWs and need to return col i and col j....for each instance of the unique depths, in specific areas of the target worksheet. Hope this helps clarify the problem.