Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Best structure to store a long list of strings?


I need to iterate through all the cells of a worksheet and delete al
rows that contain any words in a specific list. This "keyword" list i
quite long. What's the best way to store these words - keeping in min
both ease of adding more and ease of iteration, as well?

Thanks!
Elieze

--
Laze
-----------------------------------------------------------------------
Lazer's Profile: http://www.excelforum.com/member.php...nfo&userid=750
View this thread: http://www.excelforum.com/showthread.php?threadid=27296

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Best structure to store a long list of strings?

try like:

strings in in a range or array

for each rCell in rSeach.Columns(1).Cells
if iserror(application.match(rCell,rStrings,0)) then
'unfound
endif
next



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


Lazer wrote:


I need to iterate through all the cells of a worksheet and delete all
rows that contain any words in a specific list. This "keyword" list is
quite long. What's the best way to store these words - keeping in mind
both ease of adding more and ease of iteration, as well?

Thanks!
Eliezer



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Best structure to store a long list of strings?

Hi Lazer,

I need to iterate through all the cells of a worksheet and delete all
rows that contain any words in a specific list. This "keyword" list is
quite long. What's the best way to store these words - keeping in mind
both ease of adding more and ease of iteration, as well?


I would use a Dictionary object from the Windows scripting runtime for
the keyword list, mainly because it has an Exists property to test if an
item is in the list.

However, it might be more efficient to iterate through the list and use
Range.Find to see if they're used, rather than iterate through the cells
to see if they're in the list. It'll probably depend on the relative
size of the sheet and the lists.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk


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
Replacing hard returns in long text strings. Geoff C Excel Discussion (Misc queries) 3 November 20th 08 10:43 AM
store inventory sheet(ex:sports equipment store) vardan Excel Worksheet Functions 1 October 11th 06 12:51 AM
How to find number of pairs of strings from list of strings? greg_overholt Excel Worksheet Functions 5 January 27th 06 10:42 PM
Wildcard MATCH() breaks on long (?) strings [email protected] Excel Worksheet Functions 6 May 6th 05 02:11 AM
Filter long Text strings Cimorene Excel Worksheet Functions 0 December 1st 04 04:01 AM


All times are GMT +1. The time now is 02:34 PM.

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"