#1   Report Post  
Posted to microsoft.public.excel.misc
Twb Twb is offline
external usenet poster
 
Posts: 5
Default Counting a age

Hi i have a spreadsheet that has a column of different ages e.g

12.1
12.3
12.2
15.6
47.3
33.6
12.1
15.6
12.2

i need to be able to count the number of 12.1 there are in this column.

One of the problems i have is that the data comes for a query that is
created in Access so in the formula bar the cell contents look like
21.1663244353183, if i use roundup it then changes the contents.

Can anyone help with a formula please.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Counting a age

On way:
=SUMPRODUCT(--((INT(A1:A10*10)/10)=21.1))

(I used 21.1, not 12.1)

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

Twb wrote:

Hi i have a spreadsheet that has a column of different ages e.g

12.1
12.3
12.2
15.6
47.3
33.6
12.1
15.6
12.2

i need to be able to count the number of 12.1 there are in this column.

One of the problems i have is that the data comes for a query that is
created in Access so in the formula bar the cell contents look like
21.1663244353183, if i use roundup it then changes the contents.

Can anyone help with a formula please.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Twb Twb is offline
external usenet poster
 
Posts: 5
Default Counting a age

Thanks Dave, really appreciate your help and time.

"Dave Peterson" wrote:

On way:
=SUMPRODUCT(--((INT(A1:A10*10)/10)=21.1))

(I used 21.1, not 12.1)

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

Twb wrote:

Hi i have a spreadsheet that has a column of different ages e.g

12.1
12.3
12.2
15.6
47.3
33.6
12.1
15.6
12.2

i need to be able to count the number of 12.1 there are in this column.

One of the problems i have is that the data comes for a query that is
created in Access so in the formula bar the cell contents look like
21.1663244353183, if i use roundup it then changes the contents.

Can anyone help with a formula please.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
Twb Twb is offline
external usenet poster
 
Posts: 5
Default Counting a age

Hi Dave, this formula works well however just noticed that it will not accept
47.10 or any number that is **.10 in the formula, it shows it as
=SUMPRODUCT(--((INT(A1:A10*10)/10)=47.1)), it does accept 47.11, spent the
whole weekend trying different variations but to no joy, can you explain why
this would be and a solution.
It's the same in either 2007 or 2003.
Many thanks


"Dave Peterson" wrote:

On way:
=SUMPRODUCT(--((INT(A1:A10*10)/10)=21.1))

(I used 21.1, not 12.1)

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

Twb wrote:

Hi i have a spreadsheet that has a column of different ages e.g

12.1
12.3
12.2
15.6
47.3
33.6
12.1
15.6
12.2

i need to be able to count the number of 12.1 there are in this column.

One of the problems i have is that the data comes for a query that is
created in Access so in the formula bar the cell contents look like
21.1663244353183, if i use roundup it then changes the contents.

Can anyone help with a formula please.


--

Dave Peterson

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
counting function but not double counting duplicates JRD Excel Worksheet Functions 2 November 7th 07 07:43 PM
counting if Kat Excel Worksheet Functions 1 May 26th 06 09:00 PM
I need help has to do with counting ladivapr Excel Discussion (Misc queries) 3 August 17th 05 01:18 AM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
Counting names in a column but counting duplicate names once TBoe Excel Discussion (Misc queries) 9 May 11th 05 11:24 PM


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