LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Loop through range of cells, string search, take action

Hi there

I'm pretty new to this vba stuff, so hopefully this is not a difficult
request!

I'm after a code snippet that will loop through a range of cells - say
E2:H40 looking for strings in cells. In this case I'm looking for bits
of addresses. if any of the cells in that range on any particular row
contain "Preston" or "PR2 4JK" i'd like the macro to then put "1772" in
the 'I' cell on that row.

the cells may contain more characters than the "Preston", so as long as
the cell contains that string, the if/case statement should be true.

Thanks

 
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
search for a particular string in cells hsg Excel Worksheet Functions 3 January 30th 10 04:54 PM
Do Loop or use End iF for search string RGreen Excel Discussion (Misc queries) 4 September 1st 09 12:59 AM
Search string in cells for a criteria in a list VBA Noob[_7_] Excel Programming 0 May 1st 06 09:35 PM
search a string withing a string : find / search hangs itarnak[_9_] Excel Programming 4 October 24th 05 03:19 PM
Limit search range then loop thru' each cell...a bit stuck... ste mac Excel Programming 1 December 17th 04 01:35 PM


All times are GMT +1. The time now is 04:43 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"