+ Reply to Thread
Results 1 to 2 of 2

count if

  1. #1
    Registered User
    Join Date
    10-02-2005
    Posts
    2

    Question 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

  2. #2
    Forum Contributor
    Join Date
    06-23-2004
    Location
    Houston, TX
    Posts
    571
    One way ...

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


    Regards.


    Quote Originally Posted by alexsmalley
    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
    Houston, TX

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1