Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default How do I sum cells by refering to discrete values?

I have a small table which is 12 rows deep.

It can be simplified and summarised as follows;

A B C D
1 10 1 2
2 5 1 3
3 16 2 2
4 1 3 2
5 13 4 3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3
10 12 6 2
11 14 7 2
12 16 2 2

Colum A can contain any value, Colum B is restricted to integers 1-8, and
Colum C is restricted to either 2 or 3.

I require Colum D to show the sum of ("A#"/"C#") for each row which has the
same number in Colum B and then list it against the first row with that
number only

thus the completed table would be as follows

A B C D
1 10 1 2 12.3
2 5 1 3
3 16 2 2 16.0
4 1 3 2 6.5
5 13 4 3 12.3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3 4
10 12 6 2 6
11 14 7 2 7
12 16 2 2

Ive searched and found partial solutions but cant seam to work out a string
to go in the Colum D cells that will do it all.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How do I sum cells by refering to discrete values?

Hi,

I'm confused (not unusual for me at my age) but I can't wotk out how the
numbers in column D are arrived at. I think explaining what "sum of
("A#"/"C#")" would be helpful.

Mike

"Jive" wrote:

I have a small table which is 12 rows deep.

It can be simplified and summarised as follows;

A B C D
1 10 1 2
2 5 1 3
3 16 2 2
4 1 3 2
5 13 4 3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3
10 12 6 2
11 14 7 2
12 16 2 2

Colum A can contain any value, Colum B is restricted to integers 1-8, and
Colum C is restricted to either 2 or 3.

I require Colum D to show the sum of ("A#"/"C#") for each row which has the
same number in Colum B and then list it against the first row with that
number only

thus the completed table would be as follows

A B C D
1 10 1 2 12.3
2 5 1 3
3 16 2 2 16.0
4 1 3 2 6.5
5 13 4 3 12.3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3 4
10 12 6 2 6
11 14 7 2 7
12 16 2 2

Ive searched and found partial solutions but cant seam to work out a string
to go in the Colum D cells that will do it all.

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How do I sum cells by refering to discrete values?

=IF(COUNTIF($B$1:B1,B1)=1,SUMPRODUCT(--($B$1:$B$12=B1),$A$1:$A$12/$C$1:$C$12),"")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Jive" wrote in message
...
I have a small table which is 12 rows deep.

It can be simplified and summarised as follows;

A B C D
1 10 1 2
2 5 1 3
3 16 2 2
4 1 3 2
5 13 4 3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3
10 12 6 2
11 14 7 2
12 16 2 2

Colum A can contain any value, Colum B is restricted to integers 1-8, and
Colum C is restricted to either 2 or 3.

I require Colum D to show the sum of ("A#"/"C#") for each row which has
the
same number in Colum B and then list it against the first row with that
number only

thus the completed table would be as follows

A B C D
1 10 1 2 12.3
2 5 1 3
3 16 2 2 16.0
4 1 3 2 6.5
5 13 4 3 12.3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3 4
10 12 6 2 6
11 14 7 2 7
12 16 2 2

I've searched and found partial solutions but cant seam to work out a
string
to go in the Colum D cells that will do it all.

Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How do I sum cells by refering to discrete values?

Another thought ..

Put in D1:
=IF(COUNTIF(B$1:B1,B1)1,"",SUMIF(B:B,B1,A:A)/SUMIF(B:B,B1,C:C))
Copy down. This yields:

10 1 2 4
5 1 3
16 2 2 8
1 3 2 3.8
13 4 3 5.8
16 4 2
17 1 3
18 3 3
12 5 3 4
12 6 2 6
14 7 2 7
16 2 2

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Jive" wrote in message
...
I have a small table which is 12 rows deep.

It can be simplified and summarised as follows;

A B C D
1 10 1 2
2 5 1 3
3 16 2 2
4 1 3 2
5 13 4 3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3
10 12 6 2
11 14 7 2
12 16 2 2

Colum A can contain any value, Colum B is restricted to integers 1-8, and
Colum C is restricted to either 2 or 3.

I require Colum D to show the sum of ("A#"/"C#") for each row which has
the
same number in Colum B and then list it against the first row with that
number only

thus the completed table would be as follows

A B C D
1 10 1 2 12.3
2 5 1 3
3 16 2 2 16.0
4 1 3 2 6.5
5 13 4 3 12.3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3 4
10 12 6 2 6
11 14 7 2 7
12 16 2 2

I've searched and found partial solutions but cant seam to work out a
string
to go in the Colum D cells that will do it all.

Thanks in advance.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default How do I sum cells by refering to discrete values?

This is an array formula, committed by pressing Ctrl-Shift-Enter

=IF(COUNTIF(B$1:B1,B1)=1,SUMPRODUCT(--($B$1:$B$12=B1),$A$1:$A$12/$C$1:$C$12),"")

"Jive" wrote:

I have a small table which is 12 rows deep.

It can be simplified and summarised as follows;

A B C D
1 10 1 2
2 5 1 3
3 16 2 2
4 1 3 2
5 13 4 3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3
10 12 6 2
11 14 7 2
12 16 2 2

Colum A can contain any value, Colum B is restricted to integers 1-8, and
Colum C is restricted to either 2 or 3.

I require Colum D to show the sum of ("A#"/"C#") for each row which has the
same number in Colum B and then list it against the first row with that
number only

thus the completed table would be as follows

A B C D
1 10 1 2 12.3
2 5 1 3
3 16 2 2 16.0
4 1 3 2 6.5
5 13 4 3 12.3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3 4
10 12 6 2 6
11 14 7 2 7
12 16 2 2

Ive searched and found partial solutions but cant seam to work out a string
to go in the Colum D cells that will do it all.

Thanks in advance.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How do I sum cells by refering to discrete values?


"Duke Carey" wrote in message
...
This is an array formula, committed by pressing Ctrl-Shift-Enter

=IF(COUNTIF(B$1:B1,B1)=1,SUMPRODUCT(--($B$1:$B$12=B1),$A$1:$A$12/$C$1:$C$12),"")


No it isn't.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default How do I sum cells by refering to discrete values?

Mea culpa

"Bob Phillips" wrote:


"Duke Carey" wrote in message
...
This is an array formula, committed by pressing Ctrl-Shift-Enter

=IF(COUNTIF(B$1:B1,B1)=1,SUMPRODUCT(--($B$1:$B$12=B1),$A$1:$A$12/$C$1:$C$12),"")


No it isn't.



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default How do I sum cells by refering to discrete values?

Wasnt exacxtly what i needed but it provided me the method i required

"Duke Carey" wrote:

This is an array formula, committed by pressing Ctrl-Shift-Enter

=IF(COUNTIF(B$1:B1,B1)=1,SUMPRODUCT(--($B$1:$B$12=B1),$A$1:$A$12/$C$1:$C$12),"")

"Jive" wrote:

I have a small table which is 12 rows deep.

It can be simplified and summarised as follows;

A B C D
1 10 1 2
2 5 1 3
3 16 2 2
4 1 3 2
5 13 4 3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3
10 12 6 2
11 14 7 2
12 16 2 2

Colum A can contain any value, Colum B is restricted to integers 1-8, and
Colum C is restricted to either 2 or 3.

I require Colum D to show the sum of ("A#"/"C#") for each row which has the
same number in Colum B and then list it against the first row with that
number only

thus the completed table would be as follows

A B C D
1 10 1 2 12.3
2 5 1 3
3 16 2 2 16.0
4 1 3 2 6.5
5 13 4 3 12.3
6 16 4 2
7 17 1 3
8 18 3 3
9 12 5 3 4
10 12 6 2 6
11 14 7 2 7
12 16 2 2

Ive searched and found partial solutions but cant seam to work out a string
to go in the Colum D cells that will do it all.

Thanks in advance.

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
How do I create a historgram of non-discrete events mg Charts and Charting in Excel 2 October 16th 06 05:54 PM
Refering to Cells madh83 Excel Worksheet Functions 3 July 19th 06 11:39 PM
Refering cells between worksheets In Need Excel Worksheet Functions 2 November 23rd 05 07:22 PM
How to get the values using a condition refering to the other column ramana Excel Worksheet Functions 2 October 28th 05 12:54 PM
Conditional formatting refering to another cells' value gizmo Excel Worksheet Functions 1 January 12th 05 01:06 PM


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