ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   count if (https://www.excelbanter.com/excel-discussion-misc-queries/48151-count-if.html)

alexsmalley

count if
 

I have a time series of wave data comprising wave height, period,
direction etc. I need to count the occurences of waves of a certain
height and period.

For example I would like to count the occurence of waves with a height
of 0.5-1.0m and a period of 3-4 secs. I have tried using the countif
function and the count function with a nested if function but with no
luck.

Here is an example of the series of data I have

height period
(m) (s)
0.3 5.4
0.4 5.6
0.4 6
0.3 -
0.3 4.4
0.3 4
0.3 4
0.3 4.1
0.3 3.7
0.3 4.1
0.3 3.5
0.3 3.6
0.3 3.6
0.3 4.2
0.3 4.1
0.3 3.8
0.3 3.8
0.3 3.5
0.3 3.7
0.3 4
0.3 3.8
0.3 4
0.3 3.6
0.3 4.2
0.3 4.2
0.3 3.7
0.3 4
0.3 4.3
0.3 4.5
0.3 4.5
0.3 4.2


Any ideas would be greatly appreciated

Thanks

Alex


--
alexsmalley
------------------------------------------------------------------------
alexsmalley's Profile: http://www.excelforum.com/member.php...o&userid=27729
View this thread: http://www.excelforum.com/showthread...hreadid=472410


BenjieLop


One way ...

=sumproduct((A1:A100=0.5)*(A1:A100<=1.0)*(B1:B100 =3)*(B1:B100<=4))


Regards.


alexsmalley Wrote:
I have a time series of wave data comprising wave height, period,
direction etc. I need to count the occurences of waves of a certain
height and period.

For example I would like to count the occurence of waves with a height
of 0.5-1.0m and a period of 3-4 secs. I have tried using the countif
function and the count function with a nested if function but with no
luck.

Here is an example of the series of data I have

height period
(m) (s)
0.3 5.4
0.4 5.6
0.4 6
0.3 -
0.3 4.4
0.3 4
0.3 4
0.3 4.1
0.3 3.7
0.3 4.1
0.3 3.5
0.3 3.6
0.3 3.6
0.3 4.2
0.3 4.1
0.3 3.8
0.3 3.8
0.3 3.5
0.3 3.7
0.3 4
0.3 3.8
0.3 4
0.3 3.6
0.3 4.2
0.3 4.2
0.3 3.7
0.3 4
0.3 4.3
0.3 4.5
0.3 4.5
0.3 4.2


Any ideas would be greatly appreciated

Thanks

Alex



--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=472410



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

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