ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   count entries (https://www.excelbanter.com/excel-worksheet-functions/117652-count-entries.html)

tom ossieur

count entries
 
Hi!

given the table below - example -

John 2
Fred 3
Eric 1
Eric 3
John 4
Eric 2
Fred 2
Eric 1

1. I want to count how often a name occurs
e.g. Eric = 4

2. I want to calculate the sum of the values for a certain person
e.g. Eric = 7

Any solution?

Thanks!

tom

Don Guillett

count entries
 
look in the help index for COUNTIF and SUMIF

--
Don Guillett
SalesAid Software

"tom ossieur" wrote in message
...
Hi!

given the table below - example -

John 2
Fred 3
Eric 1
Eric 3
John 4
Eric 2
Fred 2
Eric 1

1. I want to count how often a name occurs
e.g. Eric = 4

2. I want to calculate the sum of the values for a certain person
e.g. Eric = 7

Any solution?

Thanks!

tom




Dave F

count entries
 
=COUNTIF([range],"Eric") -- replace [range] with the correct range on your
worksheet.

=SUMIF([range],"Eric") -- replace [range] with the correct range on your
worksheet.
--
Brevity is the soul of wit.


"tom ossieur" wrote:

Hi!

given the table below - example -

John 2
Fred 3
Eric 1
Eric 3
John 4
Eric 2
Fred 2
Eric 1

1. I want to count how often a name occurs
e.g. Eric = 4

2. I want to calculate the sum of the values for a certain person
e.g. Eric = 7

Any solution?

Thanks!

tom


tom ossieur

count entries
 
Hi! Thanks for the answers!

still encountering problems with SUMIF. The actual table contains sevrel
colums with data.

an example:

A B C
1 green red
2 John 4 2
3 Fred 1 3
4 Eric 111 1
5 Eric 5 3
6 John 5 4
7 Eric 5 2
8 Fred 5 2
9 Eric 5 1



=SUMIF(A2:C9,"John")

The result is 0, how to get 2+4=6 as a result?

Thanks a lot!

tom


"Dave F" wrote:

=COUNTIF([range],"Eric") -- replace [range] with the correct range on your
worksheet.

=SUMIF([range],"Eric") -- replace [range] with the correct range on your
worksheet.
--
Brevity is the soul of wit.


"tom ossieur" wrote:

Hi!

given the table below - example -

John 2
Fred 3
Eric 1
Eric 3
John 4
Eric 2
Fred 2
Eric 1

1. I want to count how often a name occurs
e.g. Eric = 4

2. I want to calculate the sum of the values for a certain person
e.g. Eric = 7

Any solution?

Thanks!

tom


Don Guillett

count entries
 
=SUMPRODUCT((A2:A18="john")*B2:C18)

--
Don Guillett
SalesAid Software

"tom ossieur" wrote in message
...
Hi! Thanks for the answers!

still encountering problems with SUMIF. The actual table contains sevrel
colums with data.

an example:

A B C
1 green red
2 John 4 2
3 Fred 1 3
4 Eric 111 1
5 Eric 5 3
6 John 5 4
7 Eric 5 2
8 Fred 5 2
9 Eric 5 1



=SUMIF(A2:C9,"John")

The result is 0, how to get 2+4=6 as a result?

Thanks a lot!

tom


"Dave F" wrote:

=COUNTIF([range],"Eric") -- replace [range] with the correct range on
your
worksheet.

=SUMIF([range],"Eric") -- replace [range] with the correct range on your
worksheet.
--
Brevity is the soul of wit.


"tom ossieur" wrote:

Hi!

given the table below - example -

John 2
Fred 3
Eric 1
Eric 3
John 4
Eric 2
Fred 2
Eric 1

1. I want to count how often a name occurs
e.g. Eric = 4

2. I want to calculate the sum of the values for a certain person
e.g. Eric = 7

Any solution?

Thanks!

tom




tom ossieur

count entries
 
Thanks a lot!

next step makes it more complicated..
given a list of years instead of names.

A B C
green red
1 1974 2 2
2 1985 6 1
3 1983 2 3
4 1974 1 3
5 1983 2 1
6 1974 4 3


How to calculate how many red in 1974. In this case the formula previously
given formula gives 0 as a result. How to solve this?

(The result should be 8)

Thanks!

tom



"Don Guillett" wrote:

=SUMPRODUCT((A2:A18="john")*B2:C18)

--
Don Guillett
SalesAid Software

"tom ossieur" wrote in message
...
Hi! Thanks for the answers!

still encountering problems with SUMIF. The actual table contains sevrel
colums with data.

an example:

A B C
1 green red
2 John 4 2
3 Fred 1 3
4 Eric 111 1
5 Eric 5 3
6 John 5 4
7 Eric 5 2
8 Fred 5 2
9 Eric 5 1



=SUMIF(A2:C9,"John")

The result is 0, how to get 2+4=6 as a result?

Thanks a lot!

tom


"Dave F" wrote:

=COUNTIF([range],"Eric") -- replace [range] with the correct range on
your
worksheet.

=SUMIF([range],"Eric") -- replace [range] with the correct range on your
worksheet.
--
Brevity is the soul of wit.


"tom ossieur" wrote:

Hi!

given the table below - example -

John 2
Fred 3
Eric 1
Eric 3
John 4
Eric 2
Fred 2
Eric 1

1. I want to count how often a name occurs
e.g. Eric = 4

2. I want to calculate the sum of the values for a certain person
e.g. Eric = 7

Any solution?

Thanks!

tom





tom ossieur

count entries
 
sorry, seems now it works.. thanks anyway!

"tom ossieur" wrote:

Thanks a lot!

next step makes it more complicated..
given a list of years instead of names.

A B C
green red
1 1974 2 2
2 1985 6 1
3 1983 2 3
4 1974 1 3
5 1983 2 1
6 1974 4 3


How to calculate how many red in 1974. In this case the formula previously
given formula gives 0 as a result. How to solve this?

(The result should be 8)

Thanks!

tom



"Don Guillett" wrote:

=SUMPRODUCT((A2:A18="john")*B2:C18)

--
Don Guillett
SalesAid Software

"tom ossieur" wrote in message
...
Hi! Thanks for the answers!

still encountering problems with SUMIF. The actual table contains sevrel
colums with data.

an example:

A B C
1 green red
2 John 4 2
3 Fred 1 3
4 Eric 111 1
5 Eric 5 3
6 John 5 4
7 Eric 5 2
8 Fred 5 2
9 Eric 5 1



=SUMIF(A2:C9,"John")

The result is 0, how to get 2+4=6 as a result?

Thanks a lot!

tom


"Dave F" wrote:

=COUNTIF([range],"Eric") -- replace [range] with the correct range on
your
worksheet.

=SUMIF([range],"Eric") -- replace [range] with the correct range on your
worksheet.
--
Brevity is the soul of wit.


"tom ossieur" wrote:

Hi!

given the table below - example -

John 2
Fred 3
Eric 1
Eric 3
John 4
Eric 2
Fred 2
Eric 1

1. I want to count how often a name occurs
e.g. Eric = 4

2. I want to calculate the sum of the values for a certain person
e.g. Eric = 7

Any solution?

Thanks!

tom





Don Guillett

count entries
 
glad to help

--
Don Guillett
SalesAid Software

"tom ossieur" wrote in message
...
sorry, seems now it works.. thanks anyway!

"tom ossieur" wrote:

Thanks a lot!

next step makes it more complicated..
given a list of years instead of names.

A B C
green red
1 1974 2 2
2 1985 6 1
3 1983 2 3
4 1974 1 3
5 1983 2 1
6 1974 4 3


How to calculate how many red in 1974. In this case the formula
previously
given formula gives 0 as a result. How to solve this?

(The result should be 8)

Thanks!

tom



"Don Guillett" wrote:

=SUMPRODUCT((A2:A18="john")*B2:C18)

--
Don Guillett
SalesAid Software

"tom ossieur" wrote in message
...
Hi! Thanks for the answers!

still encountering problems with SUMIF. The actual table contains
sevrel
colums with data.

an example:

A B C
1 green red
2 John 4 2
3 Fred 1 3
4 Eric 111 1
5 Eric 5 3
6 John 5 4
7 Eric 5 2
8 Fred 5 2
9 Eric 5 1



=SUMIF(A2:C9,"John")

The result is 0, how to get 2+4=6 as a result?

Thanks a lot!

tom


"Dave F" wrote:

=COUNTIF([range],"Eric") -- replace [range] with the correct range
on
your
worksheet.

=SUMIF([range],"Eric") -- replace [range] with the correct range on
your
worksheet.
--
Brevity is the soul of wit.


"tom ossieur" wrote:

Hi!

given the table below - example -

John 2
Fred 3
Eric 1
Eric 3
John 4
Eric 2
Fred 2
Eric 1

1. I want to count how often a name occurs
e.g. Eric = 4

2. I want to calculate the sum of the values for a certain person
e.g. Eric = 7

Any solution?

Thanks!

tom







All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com