ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro for counting within specific constraints (https://www.excelbanter.com/excel-discussion-misc-queries/177397-macro-counting-within-specific-constraints.html)

sretepe

Macro for counting within specific constraints
 
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.

Mike H

Macro for counting within specific constraints
 
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

"sretepe" wrote:

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.


sretepe

Macro for counting within specific constraints
 
Thanks, simple is always good.

"Mike H" wrote:

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

"sretepe" wrote:

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.



All times are GMT +1. The time now is 09:49 PM.

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