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>
 

Forum statistics

Threads
1,082,298
Messages
5,364,375
Members
400,793
Latest member
hamzayagiz

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top