=small

JOEE1979

Active Member
Joined
Dec 18, 2022
Messages
250
Office Version
  1. 365
Platform
  1. Windows
Hello,
I'm having an issue with a formula that I found on the MS page but I'm trying to change it
The formula is in cell "C2"
The original formula was =SMALL(array,COUNTIF(array,">"&K)+1)
I want to change "1" to cell "D2"
The reason is so the formula can start to count from where ever I tell it to start.
cell "D2" is a variable that I manually input

Thank you

Book1
BCD
110:00:00 AM10
2#NUM!4:00:00 AM
311:00:00 AM
422:00:00 AM
533:00:00 AM
644:00:00 AM
755:00:00 AM
866:00:00 AM
977:00:00 AM
1088:00:00 AM
1199:00:00 AM
121010:00:00 AM
131111:00:00 AM
141212:00:00 PM
15131:00:00 PM
16142:00:00 PM
17153:00:00 PM
18164:00:00 PM
19175:00:00 PM
Sheet1
Cell Formulas
RangeFormula
C1C1=SMALL(C3:C19,D1)
C2C2=SMALL(C3:C19,COUNTIF(C3:C19,">"&D1)+D2)
 
I copied the multiple columns into 1 column and deleted the blanks.
But now the original formula dont work anymore for some reason

Weekday Bus Cycling - Copy.xlsx
A
1Steeprock
25:00:00 AM
310
44:55:00 AM
52:25:00 AM
62:25:00 AM
72:25:00 AM
82:51:00 AM
93:15:00 AM
103:25:00 AM
114:05:00 AM
124:05:00 AM
134:20:00 AM
144:20:00 AM
154:25:00 AM
164:39:00 AM
174:50:00 AM
184:55:00 AM
194:55:00 AM
205:05:00 AM
215:05:00 AM
225:05:00 AM
235:10:00 AM
245:20:00 AM
255:25:00 AM
265:25:00 AM
275:25:00 AM
285:40:00 AM
295:40:00 AM
305:55:00 AM
316:00:00 AM
326:00:00 AM
336:10:00 AM
346:20:00 AM
356:25:00 AM
366:25:00 AM
376:30:00 AM
386:30:00 AM
396:35:00 AM
406:45:00 AM
416:52:00 AM
426:55:00 AM
437:05:00 AM
447:05:00 AM
457:25:00 AM
467:35:00 AM
479:05:00 AM
4810:05:00 AM
4910:40:00 AM
5010:45:00 AM
5111:35:00 AM
5211:50:00 AM
5312:00:00 PM
5412:02:00 PM
5512:05:00 PM
5612:19:00 PM
5712:20:00 PM
5812:25:00 PM
5912:50:00 PM
6012:55:00 PM
611:10:00 PM
621:20:00 PM
631:30:00 PM
641:35:00 PM
651:55:00 PM
662:00:00 PM
672:05:00 PM
682:10:00 PM
692:15:00 PM
702:15:00 PM
712:20:00 PM
722:20:00 PM
732:30:00 PM
742:30:00 PM
752:35:00 PM
762:35:00 PM
772:45:00 PM
782:45:00 PM
793:05:00 PM
803:10:00 PM
813:15:00 PM
823:15:00 PM
833:40:00 PM
844:00:00 PM
854:10:00 PM
864:15:00 PM
874:15:00 PM
884:15:00 PM
894:25:00 PM
904:30:00 PM
914:50:00 PM
925:30:00 PM
937:00:00 PM
Sheet2
Cell Formulas
RangeFormula
A2A2=Sheet1!B1
A3A3=Steeprock!D1
A4A4=SMALL(A5:A93,A2*24 + A3)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A66:A93Cell Value>Sheet1!$B$1textNO
A5:A65Cell Value>Sheet1!$B$1textNO
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I was thinking, what If I figure out how to copy the columns all into 1 (probably on Sheet2) and then run the original formula you gave me
i'm not sure why you would not have that function. its been in 365 for 2 years at least. can you run a program update?

putting all on one sheet would work, i think. the problem with my original proposal was twofold. a blank resolves to 0, and in the small funtion that is one of the nth smallest values. (there is a workaround but the second problem complicates that). The second problem is the "starting point" time. I never could figure out how to get that to work when after that is started to be sure that the "requested number of employees" (cell D1) is accounted for - I could not get the calculation to use what remains when there was less than the number in cell D1. So by being sure you have LOTS of records, and no blanks my original should work. but, try it out.

ahi... I see you tried it out. Let me try to debug it.
 
Upvote 0
So I put a conditional format of the start times, is there a way to maybe work with that to make it easier?

Weekday Bus Cycling - Copy.xlsx
B
1Steeprock
210:05
331
47:25
52:25
62:25
72:25
82:51
93:15
103:25
114:05
124:05
134:20
144:20
154:25
164:39
174:50
184:55
194:55
205:05
215:05
225:05
235:10
245:20
255:25
265:25
275:25
285:40
295:40
305:55
316:00
326:00
336:10
346:20
356:25
366:25
376:30
386:30
396:35
406:45
416:52
426:55
437:05
447:05
457:25
467:35
479:05
4810:05
4910:40
5010:45
5111:35
5211:50
5312:00
5412:02
5512:05
5612:19
5712:20
5812:25
5912:50
6012:55
6113:10
6213:20
6313:30
6413:35
6513:55
6614:00
6714:05
6814:10
6914:15
7014:15
7114:20
7214:20
7314:30
7414:30
7514:35
7614:35
7714:45
7814:45
7915:05
8015:10
8115:15
8215:15
8315:40
8416:00
8516:10
8616:15
8716:15
8816:15
8916:25
9016:30
9116:50
9217:30
9319:00
Sheet2
Cell Formulas
RangeFormula
B2B2=MOD(NOW(),1)
B3B3=Steeprock!$L$1
B4B4=SMALL(B5:B93,B2*24 +B3)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B5:B104Cell Value>$B$2textNO
 
Upvote 0

Forum statistics

Threads
1,215,622
Messages
6,125,886
Members
449,269
Latest member
GBCOACW

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