SMALL Function across multiple date ranges

Kingsof82

New Member
Joined
Oct 7, 2022
Messages
21
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I'm looking to find the second lowest date entered in ranges from multiple worksheets. I can return the second lowest from each range individually, e.g.

=SMALL(Observation!I16:BF16,2)

However, attempting to pull the second lowest from all ranges using the following returns a value error:

=SMALL((Probation!J13:U13, Appraisal!J13:O13,Supervision!I13:CB13,Observation!I13:BF13),2)

Any help is greatly appreciated, thanks
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
There should be at least two numerical values within those ranges. Is this the case?
They're date ranges, and not all of the ranges contain two dates on each row, but the number error persists when they do.
 
Upvote 0
Perhaps the dates are text dates rather than numerical dates?

Could you give us the 4 relevant ranges with XL2BB so that we have some realistic sample data to test with instead of us just guessing what data we are dealing with?
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)
 
Upvote 0
Perhaps the dates are text dates rather than numerical dates?

Could you give us the 4 relevant ranges with XL2BB so that we have some realistic sample data to test with instead of us just guessing what data we are dealing with?
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)
Thanks again, especially for your patience. I've only converted the column headers and top rows into the following mini sheets:

There are four sources ranges:

Probation tab:
Supervision Tracking Document Option 2.xlsm
JKLMNOPQRSTU
14P1P2P3P4P5P6P7P8P9P10P11P12
1506/10/202404/11/2024
Probation


Appraisal tab:

Supervision Tracking Document Option 2.xlsm
JKLMNO
14202320242025202620272028
15
Appraisal


Supervision tab:

Supervision Tracking Document Option 2.xlsm
IJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACB
14Jan-23Feb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24Nov-24Dec-24Jan-25Feb-25Mar-25Apr-25May-25Jun-25Jul-25Aug-25Sep-25Oct-25Nov-25Dec-25Jan-26Feb-26Mar-26Apr-26May-26Jun-26Jul-26Aug-26Sep-26Oct-26Nov-26Dec-26Jan-27Feb-27Mar-27Apr-27May-272Jun-27Jul-27Aug-27Sep-27Oct-27Nov-27Dec-27Jan-28Feb-28Mar-28Apr-28May-28Jun-28Jul-28Aug-28Sep-28Oct-28Nov-28Dec-28
15
Supervision
Cells with Conditional Formatting
CellConditionCell FormatStop If True
AF15:AF30Expression=AF15>EDATE(MAX($I15:AE15),3)+7textNO
AE15:AE30Expression=AE15>EDATE(MAX($I15:AD15),3)+7textNO
AD15:AD30Expression=AD15>EDATE(MAX($I15:AC15),3)+7textNO
AC15:AC30Expression=AC15>EDATE(MAX($I15:AB15),3)+7textNO
AB15:AB30Expression=AB15>EDATE(MAX($I15:AA15),3)+7textNO
AA15:AA30Expression=AA15>EDATE(MAX($I15:Z15),3)+7textNO
Z15:Z30Expression=Z15>EDATE(MAX($I15:Y15),3)+7textNO
Y15:Y30Expression=Y15>EDATE(MAX($I15:X15),3)+7textNO
X15:X30Expression=X15>EDATE(MAX($I15:W15),3)+7textNO
W15:W30Expression=W15>EDATE(MAX($I15:V15),3)+7textNO
V15:V30Expression=V15>EDATE(MAX($I15:U15),3)+7textNO
T15:T30Expression=T15>EDATE(MAX($I15:S15),3)+7textNO
U15:U30Expression=U15>EDATE(MAX($I15:T15),3)+7textNO
S15:S30Expression=S15>EDATE(MAX($I15:R15),3)+7textNO
R15:R30Expression=R15>EDATE(MAX($I15:Q15),3)+7textNO
Q15:Q30Expression=Q15>EDATE(MAX($I15:P15),3)+7textNO
P15:P30Expression=P15>EDATE(MAX($I15:O15),3)+7textNO
O15:O30Expression=O15>EDATE(MAX($I15:N15),3)+7textNO
N15:N30Expression=N15>EDATE(MAX($I15:M15),3)+7textNO
M15:M30,AG15:CB30Expression=M15>EDATE(MAX($I15:L15),3)+7textNO
L15:L30Expression=L15>EDATE(MAX($I$18:$K$18),3)+7textNO


Observation tab:

Supervision Tracking Document Option 2.xlsm
IJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBF
14Nov-24Dec-24Jan-25Feb-25Mar-25Apr-25May-25Jun-25Jul-25Aug-25Sep-25Oct-25Nov-25Dec-25Jan-26Feb-26Mar-26Apr-26May-26Jun-26Jul-26Aug-26Sep-26Oct-26Nov-26Dec-26Jan-27Feb-27Mar-27Apr-27May-272Jun-27Jul-27Aug-27Sep-27Oct-27Nov-27Dec-27Jan-28Feb-28Mar-28Apr-28May-28Jun-28Jul-28Aug-28Sep-28Oct-28Nov-28Dec-28
15
Observation
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I15:I30Expression=I15>EDATE(MAX(#REF!),3)+7textNO
J15:BF30Expression=J15>EDATE(MAX($I15:I15),3)+7textNO


And this is the destination table, where I'm trying to amalgamate the data from corresponding rows of the the above tabs chronologically. You'll see I've used the MIN function in the first column, but it's when trying to pull through the next lowest and so on that I'm having issues :

Supervision Tracking Document Option 2.xlsm
GHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
4Column1Column2Column3Column4Column5Column6Column7Column8Column9Column10Column11Column12Column13Column14Column15Column16Column17Column18Column19Column20Column21Column22Column23Column24Column25Column26Column27Column28Column29Column30
506/10/2024#NUM!#VALUE!
All - Chronological
Cell Formulas
RangeFormula
G5G5=MIN(Probation!J15:U15,Appraisal!J15:O15,Supervision!I15:CB15,Observation!I15:BF15)
H5H5=AGGREGATE(15,6,CHOOSE({1;2;3;4},--(Probation!J11:U11&""),--(Appraisal!J11:O11&""),--(Supervision!I11:CB11&""),--(Observation!I11:BF11&"")),2)
I5I5=MIN(IF((Probation!J15:U15,Appraisal!J15:O15,Supervision!I15:CB15,Observation!I15:BF16)>[@Column1],))
 
Upvote 0
Your formula in H5 of the final sheet is pointing at row 11 in all the other sheets but the data you provided in the other sheets is in row 15.
If I change that formula to point at row 15 in each sheet the formula returns 4/11/2024 for me.
 
Upvote 0
Your formula in H5 of the final sheet is pointing at row 11 in all the other sheets but the data you provided in the other sheets is in row 15.
If I change that formula to point at row 15 in each sheet the formula returns 4/11/2024 for me.
If you're getting 4/11/24 on your end then it's working for you, as a manual check sees that as the second earliest date.

For some reason, changing the 11's to 15's still results in this for me:

Supervision Tracking Document Option 2.xlsm
GH
4Column1Column2
506/10/2024#NUM!
All - Chronological
Cell Formulas
RangeFormula
G5G5=MIN(Probation!J15:U15,Appraisal!J15:O15,Supervision!I15:CB15,Observation!I15:BF15)
H5H5=AGGREGATE(15,6,CHOOSE({1;2;3;4},--(Probation!J15:U15&""),--(Appraisal!J15:O15&""),--(Supervision!I15:CB15&""),--(Observation!I15:BF15&"")),2)
 
Upvote 0
Could you upload a sample file that just has the data shown in the mini sheets above and with your existing formula in H5 of 'All - Chronological' to DropBox or OneDrive or Google Drive etc and provide a public shared link to that file here? That way I can take a look at what might be different about your file & mine.
 
Upvote 0
Could you upload a sample file that just has the data shown in the mini sheets above and with your existing formula in H5 of 'All - Chronological' to DropBox or OneDrive or Google Drive etc and provide a public shared link to that file here? That way I can take a look at what might be different about your file & mine.
Thanks, the systems at my workplace are finally in the long process of being updated so I had to do it through my personal dropbox, hopefully this is suitable:

 
Upvote 0
Thanks for the file.
The suggested formula was
=AGGREGATE(15,6,CHOOSE({1;2;3;4},--(Probation!J15:U15&""),--(Appraisal!J15:O15&""),--(Supervision!I15:CB15&""),--(Observation!I15:BF15&"")),2)

Your actual formula in H5 when I open the workbook is this (though it looks right in XL2BB)
=AGGREGATE(15,6,CHOOSE({1;2;3;4},--(@Probation!J15:U15&""),--(@Appraisal!J15:O15&""),--(@Supervision!I15:CB15&""),--(@Observation!I15:BF15&"")),2)
 
Upvote 0
Thanks for the file.
The suggested formula was
=AGGREGATE(15,6,CHOOSE({1;2;3;4},--(Probation!J15:U15&""),--(Appraisal!J15:O15&""),--(Supervision!I15:CB15&""),--(Observation!I15:BF15&"")),2)

Your actual formula in H5 when I open the workbook is this (though it looks right in XL2BB)
=AGGREGATE(15,6,CHOOSE({1;2;3;4},--(@Probation!J15:U15&""),--(@Appraisal!J15:O15&""),--(@Supervision!I15:CB15&""),--(@Observation!I15:BF15&"")),2)
Thanks, the formula on the file at my end was the same as that suggested above, so I'm not sure where the '@' came from. I've since tried copying the above and pasting it in again, but keep getting the same issue. Could it be to do with the archaic version of excel I'm running?
 
Upvote 0

Forum statistics

Threads
1,224,746
Messages
6,180,705
Members
452,994
Latest member
Janick

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