Unique formula which can find delay for number 1 to 50 at once

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,371
Office Version
  1. 2010
Using Excel 2010
Hello,

I am using following formula given by Fluff under this link Count delay of specific number after it finds reset to 0, and repeat counts

I have a few numbers of results in the columns “B” they are in between 1 to 50, In the column “C” there is formula which finds the delay of the number is in the cell “C5” to get the delay of the each numbers I have to change the number and put delay of their corresponding number in the columns “G:M”

Now I require a formula which find delay of each number automatically in the columns “G:M” in the cells G6:M55 as shown in the example below. (Also I want to mention that appearance for the each number max will be 10 times)

Does it is possible to have unique formula which can find the delay of each numbers?

Note: my request if I could be possible, I can use the given formula in the excel 2000 also.

MrExcel Question.xlsx
ABCDEFGHIJKLMN
1
2
3
4Few ResultDelayUniqueUnique1 Time2 Time3 Time4 Time5 Time6 Time7 Time
5Few Result1NumCountDelayDelayDelayDelayDelayDelayDelay
629 13161458
732 2175
849 322553
945 4348118
1042 5098
117 653917452821
1215 73374505
1336 83
148 92
1535 103
1612 111
1734 122
1821 132
199 140
2033 152
21116160
2250 170
2310 185
2413 190
2520 202
2623 212
2726 221
2835 232
2924 242
303 250
3110 262
3230 270
3333 280
3439 292
35114304
3640 311
3715 322
3835 334
3923 341
4030 353
4130 362
428 372
4345 381
446 391
4540 404
4631 411
4744 421
487 432
4933 442
5029 452
5149 461
527 471
534 482
544 495
5540 502
5640 
5718 
5812 
5918 
6043 
616 
6211 
6320 
6424 
656 
668 
6749 
6848 
6937 
706 
7150 
724 
7318 
7448 
7538 
7626 
7721 
7822 
7949 
802 
8130 
8247 
833 
8441 
8544 
8649 
8710 
8832 
8943 
9033 
919 
9213 
93158
9437 
9536 
9646 
9718 
986 
9918 
Sheet1
Cell Formulas
RangeFormula
G6G6=MATCH($E6,$B$6:$B$99,0)
F6:F55F6=COUNTIF($B$6:$B$99,E6)
C6:C99C6=IF($B6=C$5,ROW()-LOOKUP(2,1/(($B$5:$B5=C$5)+($B$5:$B5="Few Result")),ROW($B$5:$B5)),"")


Please help

Thank you all.

Regards,
Moti
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
changed a bit as below to work with both excel 2010 & excel 2000 versions.
Ah, yes, I forgot about IFERROR not going back that far. You could try this much shorter one instead if you want.

22 12 24.xlsm
BCDEFGHIJKLM
4Few ResultDelayUniqueUnique1 Time2 Time3 Time4 Time5 Time6 Time7 Time
5Few Result1NumCountDelayDelayDelayDelayDelayDelayDelay
62913161458    
7322175      
849322553     
9454348118    
104250       
1176539174528  
1215736374    
13368392824    
148921472     
Delay
Cell Formulas
RangeFormula
F6:F14F6=COUNTIF($B$6:$B$99,E6)
G6:M14G6=IF(COLUMNS($G:G)>$F6,"",SMALL(IF($B$6:$B$99=$E6,ROW($B$6:$B$99)-ROW($B$5)),COLUMNS($G:G))-SUM($F6:F6)+$F6)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 1
Solution
Try.

G6
Excel Formula:
=IFERROR(MATCH($E6,$B$6:$B$99,0),"")
copy downward to the last row.

H6
Excel Formula:
=IFERROR(MATCH($E6,OFFSET($B$6:$B$99,SUM($G6:G6),),0),"")
copy to right and down
 
Upvote 0
Try.

G6
Excel Formula:
=IFERROR(MATCH($E6,$B$6:$B$99,0),"")
copy downward to the last row.

H6
Excel Formula:
=IFERROR(MATCH($E6,OFFSET($B$6:$B$99,SUM($G6:G6),),0),"")
copy to right and down
HongRu, Spot on! Formulas worked like a charm, as I request perfect, also it worked fine with Excel v2000. (y)

Thank you so much for resolving it.

Have a great weekend, good luck!

Kind Regards,
Moti :)
 
Upvote 0
If you wanted to use a single formula and also avoid using the volatile function OFFSET, you could try this array-entered formula.

22 12 24.xlsm
BCDEFGHIJKLM
4Few ResultDelayUniqueUnique1 Time2 Time3 Time4 Time5 Time6 Time7 Time
5Few Result1NumCountDelayDelayDelayDelayDelayDelayDelay
62913161458    
7322175      
849322553     
9454348118    
104250       
1176539174528  
1215736374    
13368392824    
148921472     
Delay
Cell Formulas
RangeFormula
F6:F14F6=COUNTIF($B$6:$B$99,E6)
G6:M14G6=IFERROR(SMALL(IF($B$6:$B$99=$E6,ROW($B$6:$B$99)-ROW($B$5)),COLUMNS($G:G))-SUM($F6:F6)+$F6,"")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
HongRu, Spot on! Formulas worked like a charm, as I request perfect, also it worked fine with Excel v2000. (y)

Thank you so much for resolving it.

Have a great weekend, good luck!

Kind Regards,
Moti :)
HongRu, your given formula worked perfect with excel 2010, but changed a bit as below to work with both excel 2010 & excel 2000 versions.

Have a great weekend, good luck!

MrExcel Question.xls
ABCDEFGHIJKLMN
1
2
3
4Few ResultDelayUniqueUnique1 Time2 Time3 Time4 Time5 Time6 Time7 Time
5Few Result1NumCountDelayDelayDelayDelayDelayDelayDelay
629 13161458    
732 2175
849 322553
945 4348118
1042 50
117 6539174528
1215 736374
1336 8392824
148 921472
1535 10318856
1612 11157
1734 1221142
1821 1321968
199 140
2033 152725
21116160
2250 170
2310 18552214242
2413 190
2520 2022038
2623 2121359
2726 22173
2835 2322113
2924 2422435
303 250
3110 2622249
3230 270
3333 280
3439 292144
35114304278140
3640 31141
3715 322281
3835 33415131641
3923 34112
4030 353101310
4130 362882
428 3726425
4345 38170
446 39129
4540 404319101
4631 41179
4744 4215
487 4325529
4933 4424238
5029 452434
5149 46191
527 47177
534 482636
544 49534316127
5540 5021749
Sheet1
Cell Formulas
RangeFormula
G6G6=IF(ISERROR(MATCH($E6,$B$6:$B$99,0)),"",MATCH($E6,$B$6:$B$99,0))
H6:M6H6=IF(ISERROR(MATCH($E6,OFFSET($B$6:$B$99,SUM($G6:G6),),0)),"",MATCH($E6,OFFSET($B$6:$B$99,SUM($G6:G6),),0))
C6:C55C6=IF($B6=C$5,ROW()-LOOKUP(2,1/(($B$5:$B5=C$5)+($B$5:$B5="Few Result")),ROW($B$5:$B5)),"")
F6:F55F6=COUNTIF($B$6:$B$99,E6)


Kind Regards,
Moti
 
Upvote 0
If you wanted to use a single formula and also avoid using the volatile function OFFSET, you could try this array-entered formula.

22 12 24.xlsm
BCDEFGHIJKLM
4Few ResultDelayUniqueUnique1 Time2 Time3 Time4 Time5 Time6 Time7 Time
5Few Result1NumCountDelayDelayDelayDelayDelayDelayDelay
62913161458    
7322175      
849322553     
9454348118    
104250       
1176539174528  
1215736374    
13368392824    
148921472     
Delay
Cell Formulas
RangeFormula
F6:F14F6=COUNTIF($B$6:$B$99,E6)
G6:M14G6=IFERROR(SMALL(IF($B$6:$B$99=$E6,ROW($B$6:$B$99)-ROW($B$5)),COLUMNS($G:G))-SUM($F6:F6)+$F6,"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Peter, I like your single formula worked perfect with excel 2010, will go with this one, but changed a bit as below to work with both excel 2010 & excel 2000 versions.

Thank you so much for giving an alternative single formula.

Have a great weekend, good luck! 🥂

MrExcel Question.xls
ABCDEFGHIJKLMN
1
2
3
4Few ResultDelayUniqueUnique1 Time2 Time3 Time4 Time5 Time6 Time7 Time
5Few Result1NumCountDelayDelayDelayDelayDelayDelayDelay
629 13161458    
732 2175
849 322553
945 4348118
1042 50
117 6539174528
1215 736374
1336 8392824
148 921472
1535 10318856
1612 11157
1734 1221142
1821 1321968
199 140
2033 152725
21116160
2250 170
2310 18552214242
2413 190
2520 2022038
2623 2121359
2726 22173
2835 2322113
2924 2422435
303 250
3110 2622249
3230 270
3333 280
3439 292144
35114304278140
3640 31141
3715 322281
3835 33415131641
3923 34112
4030 353101310
4130 362882
428 3726425
4345 38170
446 39129
4540 404319101
4631 41179
4744 4215
487 4325529
4933 4424238
5029 452434
5149 46191
527 47177
534 482636
544 49534316127
5540 5021749
5640 
5718 
5812 
5918 
6043 
616 
6211 
6320 
6424 
656 
668 
6749 
6848 
6937 
706 
7150 
724 
7318 
7448 
7538 
7626 
7721 
7822 
7949 
802 
8130 
8247 
833 
8441 
8544 
8649 
8710 
8832 
8943 
9033 
919 
9213 
93158
9437 
9536 
9646 
9718 
986 
9918 
Sheet2
Cell Formulas
RangeFormula
G6:M6G6=IF(ISERROR(SMALL(IF($B$6:$B$99=$E6,ROW($B$6:$B$99)-ROW($B$5)),COLUMNS($G6:G55))-SUM($F6:F6)+$F6),"",SMALL(IF($B$6:$B$99=$E6,ROW($B$6:$B$99)-ROW($B$5)),COLUMNS($G6:G55))-SUM($F6:F6)+$F6)
F6:F55F6=COUNTIF($B$6:$B$99,E6)
C6:C99C6=IF($B6=C$5,ROW()-LOOKUP(2,1/(($B$5:$B5=C$5)+($B$5:$B5="Few Result")),ROW($B$5:$B5)),"")
Press CTRL+SHIFT+ENTER to enter array formulas.


Kind Regards,
Moti :)
 
Upvote 0
Ah, yes, I forgot about IFERROR not going back that far. You could try this much shorter one instead if you want.

22 12 24.xlsm
BCDEFGHIJKLM
4Few ResultDelayUniqueUnique1 Time2 Time3 Time4 Time5 Time6 Time7 Time
5Few Result1NumCountDelayDelayDelayDelayDelayDelayDelay
62913161458    
7322175      
849322553     
9454348118    
104250       
1176539174528  
1215736374    
13368392824    
148921472     
Delay
Cell Formulas
RangeFormula
F6:F14F6=COUNTIF($B$6:$B$99,E6)
G6:M14G6=IF(COLUMNS($G:G)>$F6,"",SMALL(IF($B$6:$B$99=$E6,ROW($B$6:$B$99)-ROW($B$5)),COLUMNS($G:G))-SUM($F6:F6)+$F6)
Press CTRL+SHIFT+ENTER to enter array formulas.
Peter, I just replace your new shorter formula it worked even great with value “0” fantastic! I modified the previous formula but which were not resulting correctly with “0” with this one all is fixed ok! (y)

Thank you so much for your kind help!

I want to wish you a Merry Christmas 🍾

Kind Regards,
Moti :)
 
Upvote 0

Forum statistics

Threads
1,215,824
Messages
6,127,109
Members
449,359
Latest member
michael2

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