Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Finding cells in a range

I am trying to find cells only within a specific range such as b8:I164

The following works fine except it acts upon the whole spreadsheet and
changes cells (with my code) that I do not want changed

Cells.Find(What:=Range(myFind), After:=ActiveCell, LookIn:xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False).Activate

How do I limit the range that is searched?

Thanks

Bob
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Finding cells in a range

Bob-

The first part of your code is defining the range you want to look in. The
"Cells" method without qualifiers returns all of the cells in the worksheet,
so "Cells.Find" means you are looking in all of the cells.

To limit the range you look at use something like
Range("B8:I164").Find(What=...

Stan Shoemaker
Palo Alto, CA

"Bob Leathers" wrote:

I am trying to find cells only within a specific range such as b8:I164

The following works fine except it acts upon the whole spreadsheet and
changes cells (with my code) that I do not want changed

Cells.Find(What:=Range(myFind), After:=ActiveCell, LookIn:xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False).Activate

How do I limit the range that is searched?

Thanks

Bob

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Finding cells in a range

Instead of Cells.Find use the specific range, such as Range("A1:H10").Find.
Cells is all cells in the worksheet.

--
HTH

-------

Bob Phillips
"Bob Leathers" wrote in message
...
I am trying to find cells only within a specific range such as b8:I164

The following works fine except it acts upon the whole spreadsheet and
changes cells (with my code) that I do not want changed

Cells.Find(What:=Range(myFind), After:=ActiveCell, LookIn:xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False).Activate

How do I limit the range that is searched?

Thanks

Bob



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
Finding the earliest date from a range of cells [email protected] Excel Worksheet Functions 1 July 28th 07 06:50 AM
Finding min/max of adjacent data in a range of cells Paul987 Excel Worksheet Functions 5 July 15th 05 08:02 PM
Finding unnamed cells in a range 70Bob Excel Discussion (Misc queries) 3 June 21st 05 01:50 PM
Finding the last value in a range of cells cincode5 Excel Discussion (Misc queries) 2 April 5th 05 11:49 PM
finding a range of cells to match a date Chrissy[_4_] Excel Programming 2 July 19th 03 08:21 PM


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