I need to count the largest string of cells that contains negative numbers in consecutive cells. See attached file. I hard coded column P.
I need to count the largest string of cells that contains negative numbers in consecutive cells. See attached file. I hard coded column P.
Last edited by Scorpvin; 09-09-2008 at 02:54 PM.
No attachment?
Martin
Using your posted workbook, this ARRAY FORMULA (committed with
CTRL+SHIFT+ENTER, instead of just ENTER) seems to work:
Copy Q1 and paste into Q2 and down as far as you need.Please Login or Register to view this content.
Does that help?
It worked! Thank you!
Same sample, new problem.
If column A2 is negative I need to count the consecutive negative cells from A2 on. The result for Q2 is 4. For Q1 it would be 0 because A1 is positive.
Perhaps the same ARRAY FORMULA with a small tweak at the beginning....
Copy Q1 and paste into Q2 and down as far as you need.Please Login or Register to view this content.
Does that help?
Thanks Ron. You're awesome! Have a blessed day!
If A1 is negative I need to count how many cells including are negative consecutive cells including A1. See attached.
Maybe this....regular formula:
Does that work for you?Please Login or Register to view this content.
Worked for row 1 and row 2. Unsuccessful for row 3.
Maybe =IF(A1 >= 0, 0, IF(AND(A1:O1 < 0), COUNT(A1:O1), MATCH(TRUE, A1:O1 > 0, 0) - 1) )
Still need some help.
Perhaps:
Please Login or Register to view this content.
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Thanks for all your help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks