Do Until Loop?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create a macro that will:
1) Search through a client file for records detailed on a Do Not Call list
using Last Name, Address, etc.
2) Stop the search once a match is found to mark the record as DNC
3) Then, be able to continue searching where the search left off

Any help is greatly approciated!!!
 
Technically, it'd be just the same to fill a blank column with a vlookup
formula to compare the names between the two lists, combined with an if
to mark it as "DNC", then autofilter for all the ones named DNC and
delete those. It'd be something like:

=If(IsError(vlookup(A2,'[SheetWithDNCList]Sheet1'!$A$2:$B:$100,1,0)),"","DNC")
 
I would use a Do Until loop with an embeded if...then statement. In your
situation I would run the loop until the field (column) had 10 consecutive
rows of empty cells (10 is an arbitary #, I just used it because if there are
that many empty fields, I would assume we would be at the end of the list).
Using the if then statement you could check the cell for the info, if it is
there change the cell color to yellow then advance the cell ref for the next
check. If not, than just advance the cell ref.

There are many ways to perform the check and go on just remember, the loop
is for moving through the data, the if..then is for performing the check for
a match and highlighting. If you need ideas on what the code would look like
for a specific action, holla back
 
My help is just to say that if this results in less calls, ADD MY NAME!!!!!

:-)
 
What should the code for the Loop look like? I'm not sure how to reference
to cell used for the search.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top