#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe P.
 
Posts: n/a
Default Total an array

I am looking for the formula that will total the amounts of column B based on
Column A Matching Cell A10.

Col A B
Row 1: Red 10
Row 2: Blue 23
Row 3: Red 17
Row 4: Green 19

Row10: Red _____ (This should be 27)

The below formula only gives the result of 10... how to I get the total of
all numbers whose match the word "Red"?

=INDEX($A$1:$B$7,SMALL(IF($A$1:$A$4=$A$10,ROW($A$1 :$A$4)),ROW(1:1)),2)

Thank you in advance,
Joe

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Total an array

Try this:

Using your example
B10: =SUMIF(A1:A4,A10,B1:B4)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Joe P." wrote:

I am looking for the formula that will total the amounts of column B based on
Column A Matching Cell A10.

Col A B
Row 1: Red 10
Row 2: Blue 23
Row 3: Red 17
Row 4: Green 19

Row10: Red _____ (This should be 27)

The below formula only gives the result of 10... how to I get the total of
all numbers whose match the word "Red"?

=INDEX($A$1:$B$7,SMALL(IF($A$1:$A$4=$A$10,ROW($A$1 :$A$4)),ROW(1:1)),2)

Thank you in advance,
Joe

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe P.
 
Posts: n/a
Default Total an array

That was too easy ;) Is there a way to calculate the average instead of the
sum?

Thank you very much,
Joe


"Ron Coderre" wrote:

Try this:

Using your example
B10: =SUMIF(A1:A4,A10,B1:B4)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Joe P." wrote:

I am looking for the formula that will total the amounts of column B based on
Column A Matching Cell A10.

Col A B
Row 1: Red 10
Row 2: Blue 23
Row 3: Red 17
Row 4: Green 19

Row10: Red _____ (This should be 27)

The below formula only gives the result of 10... how to I get the total of
all numbers whose match the word "Red"?

=INDEX($A$1:$B$7,SMALL(IF($A$1:$A$4=$A$10,ROW($A$1 :$A$4)),ROW(1:1)),2)

Thank you in advance,
Joe

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Total an array

Try this:
B10: =SUMIF(A1:A4,A10,B1:B4)/COUNTIF(A1:A4,A10)

Alternatively, you could use this:
B10: =AVERAGE(IF(A1:A4=A10,B1:B4))
Note: Commit that array formula by holding down the [Ctrl][Shift] keys and
press [Enter].


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Joe P." wrote:

That was too easy ;) Is there a way to calculate the average instead of the
sum?

Thank you very much,
Joe


"Ron Coderre" wrote:

Try this:

Using your example
B10: =SUMIF(A1:A4,A10,B1:B4)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Joe P." wrote:

I am looking for the formula that will total the amounts of column B based on
Column A Matching Cell A10.

Col A B
Row 1: Red 10
Row 2: Blue 23
Row 3: Red 17
Row 4: Green 19

Row10: Red _____ (This should be 27)

The below formula only gives the result of 10... how to I get the total of
all numbers whose match the word "Red"?

=INDEX($A$1:$B$7,SMALL(IF($A$1:$A$4=$A$10,ROW($A$1 :$A$4)),ROW(1:1)),2)

Thank you in advance,
Joe

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
matching the column b(sku)c(count)with A sammc2 Excel Worksheet Functions 0 November 3rd 05 07:42 PM
Percent of total in Pivot tables Pallet1210A Excel Worksheet Functions 1 September 8th 05 07:12 PM
sum of total hours not correct Bruno Lauwers Setting up and Configuration of Excel 9 September 6th 05 08:03 AM
Total remaining formula jbsand1001 Excel Worksheet Functions 2 January 6th 05 04:17 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM


All times are GMT +1. The time now is 04:22 PM.

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"