Counting Multiple Ranges over set Threshold in one cell range

Davey Peter

New Member
Joined
Nov 16, 2017
Messages
1
Hi all I am looking for a formula that is going to count all of the consecutive months equal to or over a set threshold (in this case the threshold is $10). The goal of this project is to count how long capital is invested in a project before it is paid back.

My problem arises in accounts such as "Widget 2" of the attached when I have invested capital that is paid back but then reinvest capital further down the road. If I do a countif(cells over threshold) I get 7. The problem with this I am trying to find out the average amount of time money is invested before it is returned so in the attached "Widget 1" has money invested for 4 months (equal to or over threshold) and in "Widget 2" money is invested for 3 months and then paid back and then invested again for 4 months before being paid back. Ideally I would like a formula that will return 4 for "Widget 1" and somehow return both 3 and 4 for "Widget 2"


If it is not possible to have a formula that is going to return 2 answers (3 & 4 in the case of "Widget 2") it would still be valuable if I could count the range of the first time the investment breaches the threshold before it is paid back (In the case of "Widget 2" the answer would be 3 as the money was first invested at or above the threshold 3/1/2010 and was invested for 3 months before being paid back down below the threshold.)

A1BCDEFGHIJKLMNO
2Threshold$10
31/1/20102/1/20103/1/20104/1/20105/1/20106/1/20107/1/20108/1/20109/1/201010/1/201011/1/201012/1/2010
4Widget 10021015201055000Count: 4
5Widget 20510151020101515105Count 3 & 4

<tbody>
</tbody>
Thank you,

<tbody>
</tbody>
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,214,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top