Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I exclude a cell from a range?
I want to exclude a cell from a range of data. That cell may or may not be at the extremities of the range.
Say I have the range for column A, A:A and I want to exclude every cell which satisfies a condition. And this is not for sum or average but what I'm trying to do is get a range without those cells so it can be used elsewhere. Can anyone help me? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I exclude a cell from a range?
wrote:
I want to exclude a cell from a range of data. That cell may or may not be at the extremities of the range. Say I have the range for column A, A:A and I want to exclude every cell which satisfies a condition. And this is not for sum or average but what I'm trying to do is get a range without those cells so it can be used elsewhere. Can anyone help me? http://msdn.microsoft.com/en-us/libr...ffice.11).aspx |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I exclude a cell from a range?
Hi Vinay
Try For each c in myRng Hi |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I exclude a cell from a range?
Take 2
Try Dim myRng as Range, c as Range Set myRng = Sheets("YourSheet").Range("A2:A1000") For each c in myRng if not c = (myCriteria) then exit sub with c 'Do Something End With Next c HTH Mick |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I exclude a cell from a range?
Take 2
Try Dim myRng as Range, c as Range Set myRng = Sheets("YourSheet").Range("A2:A1000") For each c in myRng if not c = (myCriteria) then exit sub with c 'Do Something End With Next c HTH Mick Well this clearly will exit on the 1st cell that doesn't fit myCriteria and leave the remaining cells not processed! Better way... If c = (myCriteria) Then '//do something with c End If ...so all cells in the range that fit myCriteria get processed!<g -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Resize Table Range to exclude zero values and Input New Range into achart object | Excel Programming | |||
How to exclude a cell(s) from a range w/o mult. ranges on any fcn | Excel Worksheet Functions | |||
How to exclude certain cells from a range? | Excel Programming | |||
Exclude Header from Range? | Excel Discussion (Misc queries) | |||
Exclude one range from another | Excel Programming |