Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default Formula to define non-contiguous range?

Hi folks

Is it possible to use an Excel formula to define a non-contiguous
range? I have a column of data, let's say

A1: Mechanical Causes
A2: blah
A3: blah
A4: Mechanical Causes
A5: blah
A6: Mechanical Causes

I'd like to create a named range that uses a formula that identifies
the cells in a column that have a particular value - in this case
"Mechanical Causes". I suspect it's not possible, but thought I'd see
if anyone else has any ideas.

Thanks in advance

Paul Martin
Melbourne, Australia
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Formula to define non-contiguous range?

How do you intend to use this named range in a formula?

The formula would have to be able to handle non-contiguous references and
there are very few functions that will do that and the ones that do only
handle numbers.


--
Biff
Microsoft Excel MVP


"Paul Martin" wrote in message
...
Hi folks

Is it possible to use an Excel formula to define a non-contiguous
range? I have a column of data, let's say

A1: Mechanical Causes
A2: blah
A3: blah
A4: Mechanical Causes
A5: blah
A6: Mechanical Causes

I'd like to create a named range that uses a formula that identifies
the cells in a column that have a particular value - in this case
"Mechanical Causes". I suspect it's not possible, but thought I'd see
if anyone else has any ideas.

Thanks in advance

Paul Martin
Melbourne, Australia



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Formula to define non-contiguous range?

Hi,

Please explain what you are trying to do.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Paul Martin" wrote:

Hi folks

Is it possible to use an Excel formula to define a non-contiguous
range? I have a column of data, let's say

A1: Mechanical Causes
A2: blah
A3: blah
A4: Mechanical Causes
A5: blah
A6: Mechanical Causes

I'd like to create a named range that uses a formula that identifies
the cells in a column that have a particular value - in this case
"Mechanical Causes". I suspect it's not possible, but thought I'd see
if anyone else has any ideas.

Thanks in advance

Paul Martin
Melbourne, Australia

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Formula to define non-contiguous range?

I guess my asking:

How do you intend to use this named range in a formula?


Wasn't sufficient?

--
Biff
Microsoft Excel MVP


"Shane Devenshire" wrote in
message ...
Hi,

Please explain what you are trying to do.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Paul Martin" wrote:

Hi folks

Is it possible to use an Excel formula to define a non-contiguous
range? I have a column of data, let's say

A1: Mechanical Causes
A2: blah
A3: blah
A4: Mechanical Causes
A5: blah
A6: Mechanical Causes

I'd like to create a named range that uses a formula that identifies
the cells in a column that have a particular value - in this case
"Mechanical Causes". I suspect it's not possible, but thought I'd see
if anyone else has any ideas.

Thanks in advance

Paul Martin
Melbourne, Australia



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default Formula to define non-contiguous range?

My intention was to use a formula in a named range, not a named range
in a formula. I think my problem is too complex for Excel formulas,
so I'm working on a VBA solution which is much easier.

By defining a range of non-contiguous data, I want to loop through the
cells in each area, capture (both column and row) offsets which are
then used elsewhere. I have this working, but in a different way to
originally intended.

I'm analysing the values columns, a column offset of Column A, using

Set rngValues = rngCols.SpecialCells(xlCellTypeConstants, 1)

This captures various Areas in the desired columns and, because of the
nature of the data, any values I require are part of single-cell
Areas. I loop through each Area, if the Area.Cells.Count=1, then I
capture offsets of that Area for other values I'm looking for.

Thanks for your responses

Paul


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Formula to define non-contiguous range?

My intention was to use a formula in a named range

You won't be able to use worksheet functions to create a contiguous range
from non-contiguous references.

--
Biff
Microsoft Excel MVP


"Paul Martin" wrote in message
...
My intention was to use a formula in a named range, not a named range
in a formula. I think my problem is too complex for Excel formulas,
so I'm working on a VBA solution which is much easier.

By defining a range of non-contiguous data, I want to loop through the
cells in each area, capture (both column and row) offsets which are
then used elsewhere. I have this working, but in a different way to
originally intended.

I'm analysing the values columns, a column offset of Column A, using

Set rngValues = rngCols.SpecialCells(xlCellTypeConstants, 1)

This captures various Areas in the desired columns and, because of the
nature of the data, any values I require are part of single-cell
Areas. I loop through each Area, if the Area.Cells.Count=1, then I
capture offsets of that Area for other values I'm looking for.

Thanks for your responses

Paul



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default Formula to define non-contiguous range?


You won't be able to use worksheet functions to create a contiguous range
from non-contiguous references.


I wasn't trying to. I was trying to define a range of non-contiguous
cells.
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Formula to define non-contiguous range?

Well, your subject line says:

Formula to define non-contiguous range?


So I was thinking you wanted to use some type of INDEX or OFFSET formula to
create the range.

--
Biff
Microsoft Excel MVP


"Paul Martin" wrote in message
...

You won't be able to use worksheet functions to create a contiguous range
from non-contiguous references.


I wasn't trying to. I was trying to define a range of non-contiguous
cells.



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
Join non-contiguous ranges into one range via named range? ker_01 Excel Discussion (Misc queries) 3 May 1st 09 11:09 AM
Use a formula to define a range thewizz Excel Discussion (Misc queries) 5 October 26th 07 07:29 PM
How to define range of values in a formula? yasen Excel Worksheet Functions 2 May 8th 07 07:58 AM
SUMIF non-contiguous range Lady_Olara Excel Worksheet Functions 13 January 10th 06 09:33 PM
Define a range based on another named range Basil Excel Worksheet Functions 2 February 21st 05 01:47 PM


All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"