Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Do Until Loop?

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!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Do Until Loop?


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")


--
carg1
------------------------------------------------------------------------
carg1's Profile: http://www.excelforum.com/member.php...o&userid=15271
View this thread: http://www.excelforum.com/showthread...hreadid=391331

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Do Until Loop?

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
"Jeff M" wrote:

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!!!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Do Until Loop?

My help is just to say that if this results in less calls, ADD MY NAME!!!!!

:-)

"Jeff M" wrote in message
...
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!!!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Do Until Loop?

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

"Jidings" wrote:

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
"Jeff M" wrote:

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!!!

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 loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Loop Function unable to loop Junior728 Excel Programming 1 July 28th 05 10:23 AM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM
Worksheet_Change - loop within a loop bgm Excel Programming 1 January 19th 04 01:27 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 06:15 PM.

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

About Us

"It's about Microsoft Excel"