Hello all,
Excited for my first post. MrExcel has been extremely useful in my excel journey, even as a non member, and I couldn't be more thankful ?
My question:
I have a column with positive and negative values in sheet "Sheet1" (image below). I would like to count the max number of consecutive positive and negative values when a filter is applied so that only visible cells are counted. I use the below formula but it doesn't work when filtering. I have been using SUBTOTAL to sum and count so far but finding it really difficult to wrap my head around this one.
=MAX(FREQUENCY(IF(Sheet1!DN:DN<0,ROW(Sheet1!DN:DN)),IF(Sheet1!DN:DN>=0,ROW(Sheet1!DN:DN))))
Many thanks.
Excited for my first post. MrExcel has been extremely useful in my excel journey, even as a non member, and I couldn't be more thankful ?
My question:
I have a column with positive and negative values in sheet "Sheet1" (image below). I would like to count the max number of consecutive positive and negative values when a filter is applied so that only visible cells are counted. I use the below formula but it doesn't work when filtering. I have been using SUBTOTAL to sum and count so far but finding it really difficult to wrap my head around this one.
=MAX(FREQUENCY(IF(Sheet1!DN:DN<0,ROW(Sheet1!DN:DN)),IF(Sheet1!DN:DN>=0,ROW(Sheet1!DN:DN))))
Many thanks.