Find in a range
Something like,
cLastA = Cells(Rows.Count,"A").End(xlUp).Row
cLastC = Cells(Rows.Count,"C").End(xlUp).Row)
Set testRange = Range(C1:C" & cLastC)
For Each cell in Range("A1:A" & cLastA)
On Error Resume Next
Set oFind = testRange.Find(cell.Value)
on error goto 0
If oFind Is Nothing Then
Cells(cLastC+1,"C").Value = cell.Value
cLastC = cLastC + 1
End If
Set oFind = Nothing
Next cell
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Todd Huttenstine" wrote in message
...
Hey guys
I need a code that will simply return true or false if a
value is found in a range.
Range C:C contains a list of values. Range A:A also
contains a list of values. What is a code that will look
at each value in range A:A and determine wheather or not
its in Range C:C. If the value is detected in range C:C
then do nothing. If the value is NOT detected in range
C:C then add it to the range at the bottom.
What is the code for this?
Thank you
Todd Huttenstine
|