H
Howard
Can I copy FndPrd to a list on the same sheet and/or to another sheet.
What I have gives me TRUE in K2 and I have marching ants around the
..Union arguments 1 & 2 and 3 & 4 on the sheet.
Thanks,
Howard
Option Explicit
Option Compare Text
Sub TheUnionOf()
Dim FndPrd As String
Dim c As Range
FndPrd = Application.InputBox("Enter Col A Item.", _
"Col A Finder", , , , , , 2)
For Each c In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
If c = FndPrd Then
Set FndPrd = Application.Union(c.Offset(0, 1), c.Offset(0, 2), c.Offset(0, 4), c.Offset(0, 5))
Range("K100").End(xlUp).Offset(1, 0) = FndPrd
End If
Next
End Sub
What I have gives me TRUE in K2 and I have marching ants around the
..Union arguments 1 & 2 and 3 & 4 on the sheet.
Thanks,
Howard
Option Explicit
Option Compare Text
Sub TheUnionOf()
Dim FndPrd As String
Dim c As Range
FndPrd = Application.InputBox("Enter Col A Item.", _
"Col A Finder", , , , , , 2)
For Each c In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
If c = FndPrd Then
Set FndPrd = Application.Union(c.Offset(0, 1), c.Offset(0, 2), c.Offset(0, 4), c.Offset(0, 5))
Range("K100").End(xlUp).Offset(1, 0) = FndPrd
End If
Next
End Sub