LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default How to exclude certain cells from a range?

I have a range set to a group of cells (say A1:E5) -call it rngSquare. I've
iterated through this and picked out say 15 non-contiguous cells to create
another range - call it rngWork. Now let's throw in ranges for each row of
the square - rngRow1 - rngRow5.

I know I can intersect and union these ranges (such as: every cell in
rngRow1 that is also in rngWork) to narrow down a search-and-select mission.
But say I want to search every cell in rngWork **except** rngRow1. Do I
have to loop through all the ranges like:
Union(Intersect(rngWork, rngRow2), Intersect(rngWork, rngRow3), etc . . .
or is there an easier way to do something like:
Intersect(rngWork, Not rngRow1)???

Ed


 
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
Need to exclude certain cells in a range Bob Smith Excel Worksheet Functions 3 May 5th 06 05:25 PM
Exclude Header from Range? nastech Excel Discussion (Misc queries) 4 December 30th 05 02:49 PM
How to use macros to copy a range of cells which can exclude some cells which I didn't want to be copied? excelnovice Excel Worksheet Functions 2 September 25th 05 12:38 AM
Exclude one range from another Charl Excel Programming 3 September 11th 05 12:26 PM
Exclude blank cells from a range? achidsey Excel Programming 4 August 12th 05 02:45 AM


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