#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 174
Default Index function

Hi all,

Given this data (from the Excel help)

In range A1:C11

Fruit Price Count
Apples 0.69 40
Bananas 0.34 38
Lemons 0.55 15
Oranges 0.25 25
Pears 0.59 40

Almonds 2.80 10
Cashews 3.55 16
Peanuts 1.25 20
Walnuts 1.75 12


=SUM(INDEX(A1:C11;0;3;1)) returns 216 and the explanation is that this is
the sum of C1:C6.

For me, the sum of C1:C6 is 158!

What is there behind that I don't see?

Wkr,

JP



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Index function

I'd say it was a typo in help.

I wonder if they meant:

=SUM(INDEX((A1:C6,A8:C11),0,3,1))

(I use commas as my list separator. You'll have to change them.)



JP Ronse wrote:

Hi all,

Given this data (from the Excel help)

In range A1:C11

Fruit Price Count
Apples 0.69 40
Bananas 0.34 38
Lemons 0.55 15
Oranges 0.25 25
Pears 0.59 40

Almonds 2.80 10
Cashews 3.55 16
Peanuts 1.25 20
Walnuts 1.75 12

=SUM(INDEX(A1:C11;0;3;1)) returns 216 and the explanation is that this is
the sum of C1:C6.

For me, the sum of C1:C6 is 158!

What is there behind that I don't see?

Wkr,

JP


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Index function

On Sun, 30 Aug 2009 16:32:04 +0200, "JP Ronse"
wrote:

Hi all,

Given this data (from the Excel help)

In range A1:C11

Fruit Price Count
Apples 0.69 40
Bananas 0.34 38
Lemons 0.55 15
Oranges 0.25 25
Pears 0.59 40

Almonds 2.80 10
Cashews 3.55 16
Peanuts 1.25 20
Walnuts 1.75 12


=SUM(INDEX(A1:C11;0;3;1)) returns 216 and the explanation is that this is
the sum of C1:C6.

For me, the sum of C1:C6 is 158!

What is there behind that I don't see?

Wkr,

JP



The explanation is wrong.
The range A1:C11 is just one area. The fact that there are empty cells
within that area does not change this.
So the area_num = 1 in your formula does not add anything.

If you want the sum of C1:C6 by using areas try this formula:
=SUM(INDEX((A1:C6,A8:C11),0,3,1))

Hope this helps / Lars-Åke



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Index function

On Sun, 30 Aug 2009 14:48:30 GMT, Lars-Åke Aspelin
wrote:

On Sun, 30 Aug 2009 16:32:04 +0200, "JP Ronse"
wrote:

Hi all,

Given this data (from the Excel help)

In range A1:C11

Fruit Price Count
Apples 0.69 40
Bananas 0.34 38
Lemons 0.55 15
Oranges 0.25 25
Pears 0.59 40

Almonds 2.80 10
Cashews 3.55 16
Peanuts 1.25 20
Walnuts 1.75 12


=SUM(INDEX(A1:C11;0;3;1)) returns 216 and the explanation is that this is
the sum of C1:C6.

For me, the sum of C1:C6 is 158!

What is there behind that I don't see?

Wkr,

JP



The explanation is wrong.
The range A1:C11 is just one area. The fact that there are empty cells
within that area does not change this.
So the area_num = 1 in your formula does not add anything.

If you want the sum of C1:C6 by using areas try this formula:
=SUM(INDEX((A1:C6,A8:C11),0,3,1))

Hope this helps / Lars-Åke


or
=SUM(INDEX((A1:C6;A8:C11);0;3;1))
as you seem to have ; as list separator.

Lars-Åke


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 174
Default Index function

Hi Dave & Lars-Åke,

Tnx for the reply. I dare not to ask if 'God' has made a mistake.

Wkr,

JP





"Lars-Åke Aspelin" wrote in message
...
On Sun, 30 Aug 2009 16:32:04 +0200, "JP Ronse"
wrote:

Hi all,

Given this data (from the Excel help)

In range A1:C11

Fruit Price Count
Apples 0.69 40
Bananas 0.34 38
Lemons 0.55 15
Oranges 0.25 25
Pears 0.59 40

Almonds 2.80 10
Cashews 3.55 16
Peanuts 1.25 20
Walnuts 1.75 12


=SUM(INDEX(A1:C11;0;3;1)) returns 216 and the explanation is that this is
the sum of C1:C6.

For me, the sum of C1:C6 is 158!

What is there behind that I don't see?

Wkr,

JP



The explanation is wrong.
The range A1:C11 is just one area. The fact that there are empty cells
within that area does not change this.
So the area_num = 1 in your formula does not add anything.

If you want the sum of C1:C6 by using areas try this formula:
=SUM(INDEX((A1:C6,A8:C11),0,3,1))

Hope this helps / Lars-Åke





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
Using INDIRECT Function and INDEX Function ChristopherG Excel Discussion (Misc queries) 1 June 10th 09 04:07 PM
Index function et Excel Discussion (Misc queries) 3 February 21st 07 06:35 AM
Index Function/Match Function M Moore Excel Discussion (Misc queries) 3 September 3rd 06 11:49 AM
If function using Index dbl Excel Worksheet Functions 13 August 9th 05 06:35 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 03:41 PM.

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"