Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Array: Counting multiple values within array

To begin with, thanks to all those who answer the million questions posted
here. Amazing the quantity of different problems people come up with and
astonishing the amount of time several devote to solving them. My hat off to
you.

OK... my question, but first, I'm using Excel 2003 and know how to use
arrays--up to a point.

I have several columnar ranges in a worksheet called, say, Month, Country,
Sales. All are named ranges.
So, my array {=SUM((Month=$A$1)*(Country=$A$2)*Sales)} works just fine if I
put the month (2 for February) and the Country (US for USA) in the
respective cells.

But let's say I need the total for TWO countries, like Burundi and Timbuctu.
How do I tell the array to add up the sales in both when I put BUTI in cell
A2??????

I've tried everything, like entering the array for each country in separate
lines and naming "BUTI" the total.

Still no go. Any ideas?

TIA






  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Array: Counting multiple values within array

Try one of these (normally entered, not array entered formulas):

A1 = month number
A2 = US
A3 = BUTI

=SUMPRODUCT(--(month=A1),--(ISNUMBER(MATCH(country,A2:A3,0))),sales)

Or, hardcoded:

=SUMPRODUCT((month=A1)*(country={"US","BUTI"})*sal es)

Biff

"Trilux_nogo" wrote in message
...
To begin with, thanks to all those who answer the million questions posted
here. Amazing the quantity of different problems people come up with and
astonishing the amount of time several devote to solving them. My hat off
to you.

OK... my question, but first, I'm using Excel 2003 and know how to use
arrays--up to a point.

I have several columnar ranges in a worksheet called, say, Month, Country,
Sales. All are named ranges.
So, my array {=SUM((Month=$A$1)*(Country=$A$2)*Sales)} works just fine if
I put the month (2 for February) and the Country (US for USA) in the
respective cells.

But let's say I need the total for TWO countries, like Burundi and
Timbuctu. How do I tell the array to add up the sales in both when I put
BUTI in cell A2??????

I've tried everything, like entering the array for each country in
separate lines and naming "BUTI" the total.

Still no go. Any ideas?

TIA








  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Array: Counting multiple values within array

This also appeared to work (array entered):
=SUM((month=A1)*(country=TRANSPOSE(A2:A3))*sales)

It looks to me like it should behave similar to using the array constant
{"US", "BUTI"}, but I'm unable to enter the formula normally w/Sumproduct
unless I use CSE. Do you know why that is??


"T. Valko" wrote:

Try one of these (normally entered, not array entered formulas):

A1 = month number
A2 = US
A3 = BUTI

=SUMPRODUCT(--(month=A1),--(ISNUMBER(MATCH(country,A2:A3,0))),sales)

Or, hardcoded:

=SUMPRODUCT((month=A1)*(country={"US","BUTI"})*sal es)

Biff

"Trilux_nogo" wrote in message
...
To begin with, thanks to all those who answer the million questions posted
here. Amazing the quantity of different problems people come up with and
astonishing the amount of time several devote to solving them. My hat off
to you.

OK... my question, but first, I'm using Excel 2003 and know how to use
arrays--up to a point.

I have several columnar ranges in a worksheet called, say, Month, Country,
Sales. All are named ranges.
So, my array {=SUM((Month=$A$1)*(Country=$A$2)*Sales)} works just fine if
I put the month (2 for February) and the Country (US for USA) in the
respective cells.

But let's say I need the total for TWO countries, like Burundi and
Timbuctu. How do I tell the array to add up the sales in both when I put
BUTI in cell A2??????

I've tried everything, like entering the array for each country in
separate lines and naming "BUTI" the total.

Still no go. Any ideas?

TIA









  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Array: Counting multiple values within array

TRANSPOSE requires array entry.

Biff

"JMB" wrote in message
...
This also appeared to work (array entered):
=SUM((month=A1)*(country=TRANSPOSE(A2:A3))*sales)

It looks to me like it should behave similar to using the array constant
{"US", "BUTI"}, but I'm unable to enter the formula normally w/Sumproduct
unless I use CSE. Do you know why that is??


"T. Valko" wrote:

Try one of these (normally entered, not array entered formulas):

A1 = month number
A2 = US
A3 = BUTI

=SUMPRODUCT(--(month=A1),--(ISNUMBER(MATCH(country,A2:A3,0))),sales)

Or, hardcoded:

=SUMPRODUCT((month=A1)*(country={"US","BUTI"})*sal es)

Biff

"Trilux_nogo" wrote in message
...
To begin with, thanks to all those who answer the million questions
posted
here. Amazing the quantity of different problems people come up with
and
astonishing the amount of time several devote to solving them. My hat
off
to you.

OK... my question, but first, I'm using Excel 2003 and know how to use
arrays--up to a point.

I have several columnar ranges in a worksheet called, say, Month,
Country,
Sales. All are named ranges.
So, my array {=SUM((Month=$A$1)*(Country=$A$2)*Sales)} works just fine
if
I put the month (2 for February) and the Country (US for USA) in the
respective cells.

But let's say I need the total for TWO countries, like Burundi and
Timbuctu. How do I tell the array to add up the sales in both when I
put
BUTI in cell A2??????

I've tried everything, like entering the array for each country in
separate lines and naming "BUTI" the total.

Still no go. Any ideas?

TIA











  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Array: Counting multiple values within array

Ah yes - now I remember. Thanks.

"T. Valko" wrote:

TRANSPOSE requires array entry.

Biff

"JMB" wrote in message
...
This also appeared to work (array entered):
=SUM((month=A1)*(country=TRANSPOSE(A2:A3))*sales)

It looks to me like it should behave similar to using the array constant
{"US", "BUTI"}, but I'm unable to enter the formula normally w/Sumproduct
unless I use CSE. Do you know why that is??


"T. Valko" wrote:

Try one of these (normally entered, not array entered formulas):

A1 = month number
A2 = US
A3 = BUTI

=SUMPRODUCT(--(month=A1),--(ISNUMBER(MATCH(country,A2:A3,0))),sales)

Or, hardcoded:

=SUMPRODUCT((month=A1)*(country={"US","BUTI"})*sal es)

Biff

"Trilux_nogo" wrote in message
...
To begin with, thanks to all those who answer the million questions
posted
here. Amazing the quantity of different problems people come up with
and
astonishing the amount of time several devote to solving them. My hat
off
to you.

OK... my question, but first, I'm using Excel 2003 and know how to use
arrays--up to a point.

I have several columnar ranges in a worksheet called, say, Month,
Country,
Sales. All are named ranges.
So, my array {=SUM((Month=$A$1)*(Country=$A$2)*Sales)} works just fine
if
I put the month (2 for February) and the Country (US for USA) in the
respective cells.

But let's say I need the total for TWO countries, like Burundi and
Timbuctu. How do I tell the array to add up the sales in both when I
put
BUTI in cell A2??????

I've tried everything, like entering the array for each country in
separate lines and naming "BUTI" the total.

Still no go. Any ideas?

TIA












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
ARRAY NOT COUNTING A CERTAIN ROW Rafterrpf Excel Worksheet Functions 2 April 15th 07 02:46 PM
Searching/Counting an array Greg2582 Excel Discussion (Misc queries) 0 March 8th 07 08:12 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 07:11 PM
Use array to return array of values Brad Excel Worksheet Functions 2 March 30th 06 06:58 PM
Counting with Array Formula Werner Rohrmoser Excel Worksheet Functions 8 September 20th 05 06:09 PM


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