Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find Last cell in Range when range is date format default105 Excel Discussion (Misc queries) 5 July 7th 09 03:11 PM
Find %ontime & SUMIF ontime ie: find matching sets within Range... Chris T-M Excel Worksheet Functions 3 October 10th 08 08:14 PM
Find the MAX number in range, then find... pgarcia Excel Discussion (Misc queries) 4 September 19th 08 06:58 PM
Find a range of values in a range of cells Jack Taylor Excel Worksheet Functions 20 November 25th 06 01:26 PM
Find dates in a range; then sum values in that range by a criteria Anders Excel Discussion (Misc queries) 4 October 21st 05 03:41 PM


All times are GMT +1. The time now is 07:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"