=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)
 
if you need this per location then you need to build it one column at a time and not on the entire matrix.
=SMALL(D$4:D$18, $F$2*24 + $F$1) and drag the formula across.

if that doesn't work, please mock up an example of what you want to see (just one or two columns).

if you need the calculation to work for the entire matrix, please tell what is wrong with the calculation?
(it may be wrong because a blank gets resolved to 0 which would be part of the small counts. if this is the case it is VERY important you give a complete description of what the matrix looks like and some examples of expected results.
I wanted it to work on multiple locations but 1 cell would do all the calculation, this way I can spread out the employees
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
to do for each location, insert a row below row 2
Use the first formula above and drag it over (make sure your cell references are proper).
 
Upvote 0
to do for each location, insert a row below row 2
Use the first formula above and drag it over (make sure your cell references are proper).
Insert a new row 3.
move formula from D2 down to D3
(it should be: =SMALL(D$4:D$18,$F$2*24 +$F$1))
then drag D3 accros to the last column.
But, again. need to fix the blanks. I'll post something for that in a few minutes.
 
Upvote 0
Insert a new row 3.
move formula from D2 down to D3
(it should be: =SMALL(D$4:D$18,$F$2*24 +$F$1))
then drag D3 accros to the last column.
But, again. need to fix the blanks. I'll post something for that in a few minutes.
Ok I will wait for your response, thank you kindly
 
Upvote 0
it is a little more wacky than I imagined. Selecting the start time and using small to figure things out is using two different processes to get data, I'm crunching on it!
 
Upvote 0
it is a little more wacky than I imagined. Selecting the start time and using small to figure things out is using two different processes to get data, I'm crunching o
I've been trying to figure it out myself, from what I've been seeing is that if the cells are blank, the formula will not calculate properly.
Problem is, for some reason, this is how HR has given me the schedule. It has a reason, but not for my department.
 
Upvote 0
Nope I'm wrong, It dont work even with the empty boxes filled
 
Upvote 0
okay, try this. It requires Excel 365:

mr excel questions 12.xlsm
ABCDEFGH
1Employees6
2Start02:00:00
310:00:0010:30:0013:45:0013:15:0005:00:0013:30:00
4Location 1Location 2Location 3Location 4Location 5Location 6
5101:00:0007:45:0001:45:0001:15:0001:30:0008:15:00
6202:00:0008:45:0002:45:0002:15:0002:30:00
7303:00:0009:45:0003:30:0014:00:00
8404:00:0011:00:0004:30:0015:00:00
9505:00:0005:15:0005:30:0016:00:00
10606:00:0012:45:0006:45:0006:15:0006:30:00
11707:30:0013:00:0015:45:00
12808:30:0016:45:0003:15:00
13904:15:00
141010:00:0010:30:0003:00:00
151111:00:0017:00:0011:15:0004:00:00
161212:00:0009:30:0012:15:0005:00:0011:30:00
171313:00:0013:45:0013:15:0006:00:0012:30:00
181414:00:0014:30:0014:45:0014:15:0007:00:0013:30:00
191515:00:0015:30:0015:15:00
Sheet8 (2)
Cell Formulas
RangeFormula
B3:G3B3=SMALL(FILTER(B$5:B$19,B$5:B$19>=$D$2,""),MIN(COUNT(FILTER(B$5:B$19,B$5:B$19>=$D$2,"")),$D$1))
B5:B10,B14:B19B5=TIME(A5,0,0)
 
Upvote 0
okay, try this. It requires Excel 365:

mr excel questions 12.xlsm
ABCDEFGH
1Employees6
2Start02:00:00
310:00:0010:30:0013:45:0013:15:0005:00:0013:30:00
4Location 1Location 2Location 3Location 4Location 5Location 6
5101:00:0007:45:0001:45:0001:15:0001:30:0008:15:00
6202:00:0008:45:0002:45:0002:15:0002:30:00
7303:00:0009:45:0003:30:0014:00:00
8404:00:0011:00:0004:30:0015:00:00
9505:00:0005:15:0005:30:0016:00:00
10606:00:0012:45:0006:45:0006:15:0006:30:00
11707:30:0013:00:0015:45:00
12808:30:0016:45:0003:15:00
13904:15:00
141010:00:0010:30:0003:00:00
151111:00:0017:00:0011:15:0004:00:00
161212:00:0009:30:0012:15:0005:00:0011:30:00
171313:00:0013:45:0013:15:0006:00:0012:30:00
181414:00:0014:30:0014:45:0014:15:0007:00:0013:30:00
191515:00:0015:30:0015:15:00
Sheet8 (2)
Cell Formulas
RangeFormula
B3:G3B3=SMALL(FILTER(B$5:B$19,B$5:B$19>=$D$2,""),MIN(COUNT(FILTER(B$5:B$19,B$5:B$19>=$D$2,"")),$D$1))
B5:B10,B14:B19B5=TIME(A5,0,0)
For some reason, my 365 dont have "FILTER" function
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,770
Members
449,095
Latest member
m_smith_solihull

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