• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Creating a "countif" formula

ad.dias

New Member
Greetings,
I had previously had help from some members around here creating a similar formula, but this one is a little more complex.
I have a file with 3 columns and over 40000 rows, with the hourly data of temperature and water content on a wall, over one year (See atached file)
I need to count the number of freeze/thaw cycles that occur when the water content is above 36,8 kg/m3, with the following condition:
In order a freeze/thaw cycle to be found valid, the freezing must take at least 2 h while any two consecutive freeze/thaw cycles must be separated by at least 2 h of thawing period.
Just to clarify, freezing takes place when T<0ºC and thawing when T>0ºC (Remember, it only counts as a freeze/thaw cycle if the water content is over 36,8 kg/m3 when freezing occurs)

Is there anyone smarter than me that can figure out how to do this? I would be immensely grateful
Kind regards

Dias
 

Attachments

  • Temperature and Water content.xlsx
    375.9 KB · Views: 6
In order a freeze/thaw cycle to be found valid, the freezing must take at least 2 h while any two consecutive freeze/thaw cycles must be separated by at least 2 h of thawing period.
To clarify further, since the readings are taken at hourly intervals, does 'taking 2 hrs' require 2 consecutive readings (actually only one hour) to be on the same side of zero, or three consecutive readings (actually 2 hours between the first and 3rd readings)?
 
In the attached there's all sorts; the only things you need is the helper column G and the cell H2.

The rest is just stuff I used to get there and check results.

Do check I've got the correct result…
 

Attachments

  • Chandoo35037Temperature and Water content.xlsm
    777.5 KB · Views: 9
Back
Top