Hi all, i have a column of 8760 values (total hours of a year) with zeros and non-zero values. I want to count the duration of the zero values, that is the sequential entries of zero values (which represent the hours of zero production for the power plant). More precisely, i want something like a COUNT function, which will add +1 for every sequential zero entry, when it finds a non-zero entry it stops (prints the till-that-entry result in a cell) and starts over.
I have thought of a UDF (user defined function) that might work, but (1) i would like to hear if there's a faster/easier way and, if not, (2) what is missing from the code to work (i haven't used UDFs before).
Thanks in advace
Please Login or Register to view this content.
Bookmarks