Calculate largest value in column year to date?

Ironman

Well-known Member
Joined
Jan 31, 2004
Messages
1,069
Office Version
  1. 365
Platform
  1. Windows
Hi

Column A12 to A23357 contains date values.

Column E12 to E23357 are either blank or contain time values in format m:ss, which are formulas Col C/Col D from the same row.

The below is a sample from Oct 1 onwards.
Exercise Log test.xlsm
ABCDE
8686Fri, 1 Oct 2021OTHER (IB)
8687Sat, 2 Oct 2021REST
8688Sun, 3 Oct 2021OTHER (IB)
8689Mon, 4 Oct 2021Cullingworth Rd/Viaduct/ Stn Road/Old Allen Road Back Lane/Wilsden Rd/ Cottingley Rd/Lee Lane/ Cross Lane/Coplowe Ln/ Crack Lane/Main Street/ Harden Ln/Mill Hill Top/ Wilsden Rd/Mad Mile/ Greenside Lane (21/02/2020)10.62:25:3413:44
8690Tue, 5 Oct 2021OTHER (IB)
8691Wed, 6 Oct 2021REST
8692Thu, 7 Oct 2021OTHER (IB)
8693Fri, 8 Oct 2021Cullingworth Rd/Haworth Rd/Flappit/L Halifax Rd/ Trough Ln/Denholme Rd/ Station Rd (Oxenhope)/ Moorhse Ln/R Marsh Ln (Haworth)/Sun St/ Bridgehouse Ln/Brow Rd Brow Top Rd/Hawrth Rd Turf Ln/Station Road/ Greenside Lane9.92:22:4114:25
8694Sat, 9 Oct 2021OTHER (IB)
8695Sun, 10 Oct 2021REST
8696Mon, 11 Oct 2021OTHER (IB)
8697Tue, 12 Oct 2021Harrogate (Centre - Inn On Cheltenham Parade)/ Valley Park/Pinewoods/ Crag Ln by RHS, Harlow Carr/Nursery Ln/Crag Ln (again)/Otley Road/Back6.71:43:4715:29
8698Wed, 13 Oct 2021OTHER (IB)
8699Thu, 14 Oct 2021REST
8700Fri, 15 Oct 2021OTHER (IB)
8701Sat, 16 Oct 2021Hallas Br/Down Bents Ln Harden Lane/Smithy Ln/ Lee Farm/Black Hills/ Golf Course/R down Beck Foot Lane/Wagon Lane/ Up LLC to 5-Rise Locks/ Back to 3-Rise Locks & over Bridge/Brown Cow/ Main Road all the way back home (25/08/2005)10.42:33:4114:47
Training Log
Cell Formulas
RangeFormula
E8689,E8701,E8697,E8693E8689=D8689/C8689

(Although Rows 8710 downwards have yet to be filled, they will eventually be).

What I'd be grateful for is a formula that returns the lowest value in Col E i.e. the fastest pace in the current year to date (for 2022 it will be 2022 year to date).

Many thanks!
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
P.S. I omitted to ask, if I could please have a second formula with the date of the above achievement that would be great too, thanks again.
 
Upvote 0
I've managed to get the below formula from a similar formula in my workbook, which combines the pace and the relevant date.

Excel Formula:
=MINIFS(E12:E23357,A12:A23357,">="&DATE(YEAR(A2),1,1),A12:A23357,"<="&DATE(YEAR(A2),12,31))&TEXT(MINIFS(A12:A23357,A12:A23357,">="&DATE(YEAR(A2),1,1),A12:A23357,"<="&DATE(YEAR(A2),12,31),E12:E23357,MINIFS(E12:E23357,A12:A23357,">="&DATE(YEAR(A2),1,1),A12:A23357,"<="&DATE(YEAR(A2),12,31)))," (d mmm)")

Cell A2 contains today's date.

The result is correct and is 0.00892606621773288 (24 Oct)

I don't know how to amend this formula to convert the decimal part of the above to the mm:ss format (it should convert to 12:51). The cell format is mm:ss and I need to do this within the above formula, without a helper cell.

Hope you can help?

Thanks again.
 
Last edited:
Upvote 0
Resolved - many thanks to myself :biggrin:

Excel Formula:
=(UPPER(TEXT(MINIFS(E12:E23357,A12:A23357,">="&DATE(YEAR(A2),1,1),A12:A23357,"<="&DATE(YEAR(A2),12,31)),"mm:ss")&TEXT(MINIFS(A12:A23357,A12:A23357,">="&DATE(YEAR(A2),1,1),A12:A23357,"<="&DATE(YEAR(A2),12,31),E12:E23357,MINIFS(E12:E23357,A12:A23357,">="&DATE(YEAR(A2),1,1),A12:A23357,"<="&DATE(YEAR(A2),12,31)))," (d mmm)")))
 
Upvote 0
Glad you got a solution.
With MS357 you could also try this
Excel Formula:
=LET(a,A12:A23357,e,E12:E23357,rws,YEAR(a)=YEAR(A2),m,MIN(FILTER(e,rws)),TEXT(m,"mm:ss")&UPPER(TEXT(MIN(FILTER(a,rws*(e=m)))," (d mmm)")))

BTW, your formula seems to be doing the opposite of the thread title. ;)
 
Upvote 0
Solution
Many thanks Peter - that's really helpful. That function seems like the missing link between formulas and VBA!
 
Upvote 0
You're welcome. The LET function effectively allows you to have variables in your formula. Not only does it allow shorter formulas in many cases but it makes their calculation more efficient as the 'variable' value only needs to be calculated once for the whole formula.
 
Upvote 0
Thank you. I'm actually still awaiting an email address acceptable to MS to be able to take up the subscription but (like others on the forum) the potential of the LET (and Lambda) functions quite excites me, although I suppose it will then involve redoing all the 6 foot long formulas like the one above :biggrin:
 
Upvote 0
Hi Peter, I've just installed MS365 and tried your formula - it returned error "#DIV/0".

Re your PS - yes I see what you mean!
 
Upvote 0
I've just installed MS365 and tried your formula - it returned error "#DIV/0".
That would suggest to me that you one or more #DIV/0! errors in column E (which wouldn't be too surprising given you seem to have division formulas there).
I would suggest that you amend your column E formulas to avoid such errors in that column.
If you do have a simple division like that shown in the mini-sheet above then try something like

Excel Formula:
=IF(C8689>0,D8689/C8689,"")
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,316
Members
452,634
Latest member
cpostell

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