A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Array function that returns values within several intervals



 
 
Thread Tools Display Modes
  #1  
Old September 23rd, 2008, 08:38 AM posted to microsoft.public.excel.worksheet.functions
Hjuler
external usenet poster
 
Posts: 4
Default Array function that returns values within several intervals

Hi,
I need to subtract numbers in a column (A2:A4) from the numbers in a row
(B22) in all possible combination, Find and return all values that match
certain intervals (F1,F2,F3,F4).

My array formula looks like this:
IF(OR(AND(B11-A2:A4F1,B11-A2:A4F2),AND(B11-A2:A4F3,B11-A2:A4F4)),B11-A2:A4,"-")

The problem is that the formula only returns "-" even though I know some of
the results are within the intervals (evaluates all the results as "not true"
even though I know they are true).

This is a simplyfied version of my work but it will illustrate my problem.
In reality I have more than 200 numbers in the row and the column and more
than 10 intervals...

I am working on a danish version of Excel so please tell me if I have
converted some symbols wrong



  #2  
Old September 23rd, 2008, 09:49 AM posted to microsoft.public.excel.worksheet.functions
muddan madhu
external usenet poster
 
Posts: 695
Default Array function that returns values within several intervals

Try this

=IF(OR((SUM(B11)-SUM(A2:A4))F1,(SUM(B11)-SUM(A2:A4))F2,
(SUM(B11)-SUM(A2:A4))F3,(SUM(B11)-SUM(A2:A4)F4)),SUM((B11))-
SUM((A2:A4)),"-")



On Sep 23, 12:38*pm, Hjuler wrote:
Hi,
I need to subtract numbers in a column (A2:A4) from the numbers in a row
(B22) in all possible combination, Find and return all values that match
certain intervals (F1,F2,F3,F4).

My array formula looks like this:
IF(OR(AND(B11-A2:A4F1,B11-A2:A4F2),AND(B11-A2:A4F3,B11-A2:A4F4)),B11-A2:A4,"-")

The problem is that the formula only returns "-" even though I know some of
the results are within the intervals (evaluates all the results as "not true"
even though I know they are true).

This is a simplyfied version of my work but it will illustrate my problem..
In reality I have more than 200 numbers in the row and the column and more
than 10 intervals...

I am working on a danish version of Excel so please tell me if I have
converted some symbols wrong


  #3  
Old September 23rd, 2008, 12:05 PM posted to microsoft.public.excel.worksheet.functions
Hjuler
external usenet poster
 
Posts: 4
Default Array function that returns values within several intervals

Hi again,

this one is not working either. With the "SUM"-command it returns the same
value in all of the cells...

"muddan madhu" skrev:

Try this

=IF(OR((SUM(B11)-SUM(A2:A4))F1,(SUM(B11)-SUM(A2:A4))F2,
(SUM(B11)-SUM(A2:A4))F3,(SUM(B11)-SUM(A2:A4)F4)),SUM((B11))-
SUM((A2:A4)),"-")



On Sep 23, 12:38 pm, Hjuler wrote:
Hi,
I need to subtract numbers in a column (A2:A4) from the numbers in a row
(B22) in all possible combination, Find and return all values that match
certain intervals (F1,F2,F3,F4).

My array formula looks like this:
IF(OR(AND(B11-A2:A4F1,B11-A2:A4F2),AND(B11-A2:A4F3,B11-A2:A4F4)),B11-A2:A4,"-")

The problem is that the formula only returns "-" even though I know some of
the results are within the intervals (evaluates all the results as "not true"
even though I know they are true).

This is a simplyfied version of my work but it will illustrate my problem..
In reality I have more than 200 numbers in the row and the column and more
than 10 intervals...

I am working on a danish version of Excel so please tell me if I have
converted some symbols wrong



  #4  
Old September 23rd, 2008, 01:20 PM posted to microsoft.public.excel.worksheet.functions
David Biddulph
external usenet poster
 
Posts: 8,714
Default Array function that returns values within several intervals

What do you mean by "in all of the cells"? You have one formula. My guess
is that you haven't really explained what you want. Try again to explain
your requirements. Give some examples if that helps.
--
David Biddulph

"Hjuler" wrote in message
...
Hi again,

this one is not working either. With the "SUM"-command it returns the same
value in all of the cells...

"muddan madhu" skrev:

Try this

=IF(OR((SUM(B11)-SUM(A2:A4))F1,(SUM(B11)-SUM(A2:A4))F2,
(SUM(B11)-SUM(A2:A4))F3,(SUM(B11)-SUM(A2:A4)F4)),SUM((B11))-
SUM((A2:A4)),"-")



On Sep 23, 12:38 pm, Hjuler wrote:
Hi,
I need to subtract numbers in a column (A2:A4) from the numbers in a
row
(B22) in all possible combination, Find and return all values that
match
certain intervals (F1,F2,F3,F4).

My array formula looks like this:
IF(OR(AND(B11-A2:A4F1,B11-A2:A4F2),AND(B11-A2:A4F3,B11-A2:A4F4)),B11-A2:A4,"-")

The problem is that the formula only returns "-" even though I know
some of
the results are within the intervals (evaluates all the results as "not
true"
even though I know they are true).

This is a simplyfied version of my work but it will illustrate my
problem..
In reality I have more than 200 numbers in the row and the column and
more
than 10 intervals...

I am working on a danish version of Excel so please tell me if I have
converted some symbols wrong





  #5  
Old September 23rd, 2008, 01:50 PM posted to microsoft.public.excel.worksheet.functions
Hjuler
external usenet poster
 
Posts: 4
Default Array function that returns values within several intervals

Okay, I will try to explain further:
It is a multicell array formula (only one formula required). My sheet looks
like this:

2 4 8
1
3
5

The 3x3 square between the numbers are where the function should be entered.

I need the differences between values in the top row and values in the first
column, and only return the values that lies within predefined intervals.
Let's say I'm only interested in results that is larger than 2 but smaller
than 4.
Then, I would get this result:

2 4 8
1 3
3
5 3

I hope this clarifies my problem further.

"David Biddulph" skrev:

What do you mean by "in all of the cells"? You have one formula. My guess
is that you haven't really explained what you want. Try again to explain
your requirements. Give some examples if that helps.
--
David Biddulph

"Hjuler" wrote in message
...
Hi again,

this one is not working either. With the "SUM"-command it returns the same
value in all of the cells...

"muddan madhu" skrev:

Try this

=IF(OR((SUM(B11)-SUM(A2:A4))F1,(SUM(B11)-SUM(A2:A4))F2,
(SUM(B11)-SUM(A2:A4))F3,(SUM(B11)-SUM(A2:A4)F4)),SUM((B11))-
SUM((A2:A4)),"-")



On Sep 23, 12:38 pm, Hjuler wrote:
Hi,
I need to subtract numbers in a column (A2:A4) from the numbers in a
row
(B22) in all possible combination, Find and return all values that
match
certain intervals (F1,F2,F3,F4).

My array formula looks like this:
IF(OR(AND(B11-A2:A4F1,B11-A2:A4F2),AND(B11-A2:A4F3,B11-A2:A4F4)),B11-A2:A4,"-")

The problem is that the formula only returns "-" even though I know
some of
the results are within the intervals (evaluates all the results as "not
true"
even though I know they are true).

This is a simplyfied version of my work but it will illustrate my
problem..
In reality I have more than 200 numbers in the row and the column and
more
than 10 intervals...

I am working on a danish version of Excel so please tell me if I have
converted some symbols wrong





  #6  
Old September 23rd, 2008, 03:20 PM posted to microsoft.public.excel.worksheet.functions
David Biddulph
external usenet poster
 
Posts: 8,714
Default Array function that returns values within several intervals

You don't need an array formula, do you?
Isn't it as simple as
=IF(OR(AND(B$1-$A2$F$1,B$1-$A2$F$2),AND(B$1-$A2$F$3,B$1-$A2$F$4)),B$1-$A2,"-")
in B2, copied down and across as appropriate?
--
David Biddulph

"Hjuler" wrote in message
...
Okay, I will try to explain further:
It is a multicell array formula (only one formula required). My sheet
looks
like this:

2 4 8
1
3
5

The 3x3 square between the numbers are where the function should be
entered.

I need the differences between values in the top row and values in the
first
column, and only return the values that lies within predefined intervals.
Let's say I'm only interested in results that is larger than 2 but smaller
than 4.
Then, I would get this result:

2 4 8
1 3
3
5 3

I hope this clarifies my problem further.

"David Biddulph" skrev:

What do you mean by "in all of the cells"? You have one formula. My
guess
is that you haven't really explained what you want. Try again to explain
your requirements. Give some examples if that helps.
--
David Biddulph

"Hjuler" wrote in message
...
Hi again,

this one is not working either. With the "SUM"-command it returns the
same
value in all of the cells...

"muddan madhu" skrev:

Try this

=IF(OR((SUM(B11)-SUM(A2:A4))F1,(SUM(B11)-SUM(A2:A4))F2,
(SUM(B11)-SUM(A2:A4))F3,(SUM(B11)-SUM(A2:A4)F4)),SUM((B11))-
SUM((A2:A4)),"-")



On Sep 23, 12:38 pm, Hjuler wrote:
Hi,
I need to subtract numbers in a column (A2:A4) from the numbers in a
row
(B22) in all possible combination, Find and return all values that
match
certain intervals (F1,F2,F3,F4).

My array formula looks like this:
IF(OR(AND(B11-A2:A4F1,B11-A2:A4F2),AND(B11-A2:A4F3,B11-A2:A4F4)),B11-A2:A4,"-")

The problem is that the formula only returns "-" even though I know
some of
the results are within the intervals (evaluates all the results as
"not
true"
even though I know they are true).

This is a simplyfied version of my work but it will illustrate my
problem..
In reality I have more than 200 numbers in the row and the column
and
more
than 10 intervals...

I am working on a danish version of Excel so please tell me if I
have
converted some symbols wrong







  #7  
Old September 23rd, 2008, 04:11 PM posted to microsoft.public.excel.worksheet.functions
Hjuler
external usenet poster
 
Posts: 4
Default Array function that returns values within several intervals

You are right, it can be done without an array formula. The thing is my work
is at an early stage and I will be doing a lot of editing until it is
finished. This is MUCH easier with array formulas. Also, the data I have now
will produce more than 65000 results! (and there is more to come). AFAIK,
array formulas are quicker when having that amount of data but I haven't
really worked that much with arrays. Am I wrong?

The copy-method really brings my brand new pc to its knees, but maybe that's
a Vista-Excel 2007 problem...

Anyway, I appreciate you time on this problem.

"David Biddulph" skrev:

You don't need an array formula, do you?
Isn't it as simple as
=IF(OR(AND(B$1-$A2$F$1,B$1-$A2$F$2),AND(B$1-$A2$F$3,B$1-$A2$F$4)),B$1-$A2,"-")
in B2, copied down and across as appropriate?
--
David Biddulph

"Hjuler" wrote in message
...
Okay, I will try to explain further:
It is a multicell array formula (only one formula required). My sheet
looks
like this:

2 4 8
1
3
5

The 3x3 square between the numbers are where the function should be
entered.

I need the differences between values in the top row and values in the
first
column, and only return the values that lies within predefined intervals.
Let's say I'm only interested in results that is larger than 2 but smaller
than 4.
Then, I would get this result:

2 4 8
1 3
3
5 3

I hope this clarifies my problem further.

"David Biddulph" skrev:

What do you mean by "in all of the cells"? You have one formula. My
guess
is that you haven't really explained what you want. Try again to explain
your requirements. Give some examples if that helps.
--
David Biddulph

"Hjuler" wrote in message
...
Hi again,

this one is not working either. With the "SUM"-command it returns the
same
value in all of the cells...

"muddan madhu" skrev:

Try this

=IF(OR((SUM(B11)-SUM(A2:A4))F1,(SUM(B11)-SUM(A2:A4))F2,
(SUM(B11)-SUM(A2:A4))F3,(SUM(B11)-SUM(A2:A4)F4)),SUM((B11))-
SUM((A2:A4)),"-")



On Sep 23, 12:38 pm, Hjuler wrote:
Hi,
I need to subtract numbers in a column (A2:A4) from the numbers in a
row
(B22) in all possible combination, Find and return all values that
match
certain intervals (F1,F2,F3,F4).

My array formula looks like this:
IF(OR(AND(B11-A2:A4F1,B11-A2:A4F2),AND(B11-A2:A4F3,B11-A2:A4F4)),B11-A2:A4,"-")

The problem is that the formula only returns "-" even though I know
some of
the results are within the intervals (evaluates all the results as
"not
true"
even though I know they are true).

This is a simplyfied version of my work but it will illustrate my
problem..
In reality I have more than 200 numbers in the row and the column
and
more
than 10 intervals...

I am working on a danish version of Excel so please tell me if I
have
converted some symbols wrong








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:10 PM.


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