LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Set range based on find

If not obvious, then
for just columns A and B, you would change
Set rng = Cells
to
Set rng = Range("A:B")

--
Regards,
Tom Ogilvy

"Jason Morin" wrote in message
...
Greetings! Through VBA, I'd like to set a range where each
cell in the range contains a value I'm looking for. For
example, assume columns A and B have text values like:

A1: "a,b,c,e"
A2: "d,k,l,m,n"
A3: "b,c,j,t"
B1: "d,e"
etc.

I'd like to loop through each cell in the 2 columns,
looking for "b". If a cell contains "b", then it becomes
part of my new range (call it "rng"). In this case,

Set rng = Range("A1","A3")

Thanks a million!

Jason



 
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 range a value fits to, assign new value based on importance RiverCity Excel Worksheet Functions 0 November 9th 08 05:01 AM
Find category value based on date range? thewiz1972 Excel Worksheet Functions 5 June 10th 06 03:28 AM
find minimum of range based on multiple criteria Weissme Excel Worksheet Functions 3 May 21st 06 05:21 PM
Need to find Min value based on date range entered Chad S Excel Worksheet Functions 0 October 28th 04 08:03 PM
Need to find Min value based on date range entered Chad S Excel Worksheet Functions 1 October 28th 04 09:52 AM


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