Count Days until a minimum value has been reached

andyb123

New Member
Joined
Oct 31, 2018
Messages
8
Hi,

I'm looking for some help please to create an equation that will count the number of days since a minimum value has been reached.

I have a list of names in a pivot table that produces a data point of top speed reached each day. I would like to be able to count the number of days it has been since each individual has reached their individual top speed value.

Please note that this is not to be an accumulation of of day 1 + day 2 etc, each day they essentially start from 0.

I've made a table below to try to illustrate what I'm working with. I'd like Days since value to produce the result in red if possible, based on today being 31/10.

Thanks in advance!

Days
Since
Value
NameTop Speed
Threshold
31/1030/1029/1028/1027/1026/1025/10
0
A2929.12423272829.321
6
B30222324272630.222
0C2727201816272226
1D282128.22328.2221718

<tbody>
</tbody>
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi, welcome to the forum!

Here is something you can try:

based on today being 31/10


In this example the value that indicates "today" is in cell B2 (note, I disagree with your expected result for the second row).


Excel 2013/2016
ABCDEFGHIJ
2Today31/10
3
4ThresholdNameTop Speed31/1030/1029/1028/1027/1026/1025/10
50A2929.12423272829.321
65B30222324272630.222
70C2727201816272226
81D282128.22328.2221718
Sheet1
Cell Formulas
RangeFormula
A5=MATCH(TRUE,INDEX(INDEX(D5:J5,MATCH($B$2,$D$4:$J$4,0)):J5>=C5,0),0)-1
 
Upvote 0
Thanks, that has worked! Well spotted with my mistake on player B as well!

One little thing that could make it perfect, if there is a way to do it. It's not counting blank cells, any way I can get it to do this?
 
Upvote 0
Hi, can you post an example table (just like you did in post#1) that includes some blank cells along with the expected results.

Days SinceNameThreshold31/1030/1029/1028/1027/1026/1025/10
3A3022253122232119
3B30223119232217

<tbody>
</tbody>


Currently, it would work out as person B being 2 days since.


Thanks!
 
Upvote 0
Currently, it would work out as person B being 2 days since.

Hi, based on your previous examples shouldn't it return 2 for both?


Excel 2013/2016
ABCDEFGHIJ
4Days SinceNameThreshold31/1030/1029/1028/1027/1026/1025/10
52A3022253122232119
62B30223119232217
70A2929.12423272829.321
85B30222324272630.222
90C2727201816272226
101D282128.22328.2221718
Sheet1
Cell Formulas
RangeFormula
A5=MATCH(TRUE,INDEX(INDEX(D5:J5,MATCH($B$2,$D$4:$J$4,0)):J5>=C5,0),0)-1
 
Upvote 0
Days SinceNameThreshold31/1030/1029/1028/1027/1026/1025/10
2
A301731253122232119
3B3022312819232217

<tbody>
</tbody>



Hi,


Sorry - yes you are correct, I'm not very good at giving these examples!

Hopefully the above gives a better picture. At the moment, it is counting both A and B as two days since, where I would like B to say 3 days.
 
Upvote 0
Hi, I think your blank cells are not really blank - here is an option that should help with that.


Excel 2013/2016
ABCDEFGHIJ
231/10
3
4Days SinceNameThreshold31/1030/1029/1028/1027/1026/1025/10
52A3017312531222321
63B30223128192322
Sheet1
Cell Formulas
RangeFormula
A5=MATCH(1,INDEX((ISNUMBER(INDEX(D5:J5,MATCH($B$2,$D$4:$J$4,0)):J5))*(INDEX(D5:J5,MATCH($B$2,$D$4:$J$4,0)):J5>C5),0),0)
 
Upvote 0

Forum statistics

Threads
1,215,195
Messages
6,123,572
Members
449,108
Latest member
rache47

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