Macro for counting within specific constraints

S

sretepe

Hi I'm relatively new to macros and looking for some help and/or direction to
an online source for macro development help. I have columns of data and for
one column I would like to count the number of entries that lie within
certain ranges. For example:

YearMo Day Quantity
200101 1 0.1
200101 2 0.13
200101 3 0.25
200101 4 0.38
200101 5 0.18
and so on for my data table

Macro products wanted
#? Number Count < 0.1
#? Number Count >=0.1 & <0.2

The macro product I'm looking for in the total count entered in a cell with
a description of the count in an adjacent cell. Thanks for any help you all
can provide.
 
M

Mike H

Hi,

We can resort to a macro if you want but for a start why not formula:-


For less than 0.1
=COUNTIF(C2:C6,"<0.1")
For >=0.1 <0.2
=COUNTIF(C2:C6,">=0.1")-COUNTIF(C2:C6,">=0.2")

Mike
 
S

sretepe

Thanks, simple is always good.

Mike H said:
Hi,

We can resort to a macro if you want but for a start why not formula:-


For less than 0.1
=COUNTIF(C2:C6,"<0.1")
For >=0.1 <0.2
=COUNTIF(C2:C6,">=0.1")-COUNTIF(C2:C6,">=0.2")

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top