HTML:
Sub FT()
Dim InsType As Range
Dim Rng As Range
Sheets("Computation").Select
For Each InsType In Range("H2", Range("H" & Rows.Count).End(xlUp))
If InsType.Value = "Cross Rate" Or InsType.Value = "Currency" And InStr(InsType.Offset(0, 8).Value, "Yes") Then
If Rng Is Nothing Then
Set Rng = InsType.Offset(0, -6)
Else
Set Rng = Union(Rng, InsType.Offset(0, -6))
End If
End If
Next InsType
If Not Rng Is Nothing Then Rng.Copy
Sheets("Load to VA").Select
Range("A3").Select
ActiveCell.PasteSpecial xlPasteValues
Selection.NumberFormat = "General"
End Sub
I think the error is because Rng is = nothing, I don't know why but what I want to happen is if Rng is nothing, it should not do anything.
advance Thanks!!!!