Formula to calculate last month's total hours and current month to date total hours

Ironman

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

I have a fitness log as below and I'm looking for 2 formulas that calculate the total time shown in column D:

1) for the current month to date and

2) for the previous month.

Please note that the below is an excerpt showing only the last 2 months - the log has some 3,000 rows and begins on row A12.

If it's of assistance in the solution, the current date is shown in cell A2 (not shown in the range below).

A solution would be greatly appreciated.

Many thanks.

Tue, 1 Jun 2021REST
Wed, 2 Jun 2021OTHER
Thu, 3 Jun 2021REST
Fri, 4 Jun 2021REST
Sat, 5 Jun 2021OTHER
Sun, 6 Jun 2021REST
Mon, 7 Jun 2021OTHER
Tue, 8 Jun 2021REST
Wed, 9 Jun 2021Skendleby, N Lincs (Cottage behind Blacksmith's Arms)2.00:30:40
Thu, 10 Jun 2021Skendleby, N Lincs (Cottage behind Blacksmith's Arms)3.60:56:44
Fri, 11 Jun 2021Skendleby, N Lincs (Cottage behind Blacksmith's Arms)2.00:32:19
Sat, 12 Jun 2021REST
Sun, 13 Jun 2021OTHER
Mon, 14 Jun 2021Cull. Road/Viaduct (up and down)/Halifax Road/ Greenside Lane (08/11/2018)2.20:33:59
Tue, 15 Jun 2021OTHER
Wed, 16 Jun 2021REST
Thu, 17 Jun 2021OTHER
Fri, 18 Jun 2021Cullingworth Rd/Viaduct/ Ling Bob roundabout/ Wilsden/Bents Lane/ Hallas Bridge (09/12/2018)4.20:55:39
Sat, 19 Jun 2021OTHER
Sun, 20 Jun 2021REST
Mon, 21 Jun 2021OTHER
Tue, 22 Jun 2021Cullingworth Rd/Viaduct/ Stn Road/Old Allen Road Back Lane/Wilsden Rd/ Cottingley Rd/Lee Lane/ Cross Lane/Coplowe Ln/ Crack Lane/Main Street/ Bents Lane/Hallas Bridge (22/06/2021)8.82:12:20
Wed, 23 Jun 20212x OTHER
Thu, 24 Jun 2021REST
Fri, 25 Jun 2021OTHER
Sat, 26 Jun 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:40:15
Sun, 27 Jun 2021OTHER
Mon, 28 Jun 2021REST
Tue, 29 Jun 2021OTHER
Wed, 30 Jun 2021Cullingworth Rd/Viaduct/ Stn Road/Old Allen Road Back Lane/Wilsden Rd/ Cottingley Rd/Lee Lane/ Cross Lane/Coplowe Ln/ Crack Lane/Main Street/ Bents Lane/Hallas Bridge (22/06/2021)8.82:07:10
Thu, 1 Jul 2021OTHER
Fri, 2 Jul 2021REST
Sat, 3 Jul 2021OTHER
Sun, 4 Jul 2021Hallas Br/Down Bents Ln Harden Lane/Smithy Ln/ Lee Farm/Black Hills/ Golf Course/R down Beck Foot Lane/Wagon Lane/ Up LLC/5-Rise Locks/ 2 Bridges (Swine Lane)/ Back to 3-Rise Locks & over Bridge/Brown Cow/ Main Road all the way back home (04/07/2021)14.13:41:10
Mon, 5 Jul 2021OTHER
Tue, 6 Jul 2021REST
Wed, 7 Jul 2021OTHER
Thu, 8 Jul 2021Cullingworth Rd/Viaduct/ Stn Road/Old Allen Rd/ Back Lane/Shay Lane/ Crack Lane/Main Street/ Bents Lane/Hallas Bridge (23/02/2020)6.21:38:10
Fri, 9 Jul 2021OTHER
Sat, 10 Jul 2021REST
Sun, 11 Jul 2021OTHER
Mon, 12 Jul 2021Cullingworth Rd/Viaduct/ Stn Road/Old Allen Road Back Lane/Wilsden Rd/ Cottingley Rd/Lee Lane/ Cross Lane/Coplowe Ln/ Crack Lane/Main Street/ Bents Lane/Hallas Bridge (22/06/2021)8.82:15:04
Tue, 13 Jul 2021OTHER
Wed, 14 Jul 2021REST
Thu, 15 Jul 2021OTHER
Fri, 16 Jul 2021Cullingworth Rd/Viaduct/ Stn Road/Old Allen Road Back Lane/Wilsden Rd/ Cottingley Rd/Lee Lane/ Cross Lane/Coplowe Ln/ Crack Lane/Main Street/ Bents Lane/Hallas Bridge (22/06/2021)8.82:14:27
Sat, 17 Jul 2021OTHER
Sun, 18 Jul 2021REST
Mon, 19 Jul 2021OTHER
Tue, 20 Jul 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:44:52
Wed, 21 Jul 2021OTHER
Thu, 22 Jul 2021REST
Fri, 23 Jul 2021OTHER
Sat, 24 Jul 2021Cullingworth Rd/Viaduct/ Stn Road/Old Allen Road Back Lane/Wilsden Rd/ Cottingley Rd/Lee Lane/ Cross Lane/Coplowe Ln/ Crack Lane/Main Street/ Bents Lane/Hallas Bridge (22/06/2021)8.82:06:27
Sun, 25 Jul 2021OTHER
Mon, 26 Jul 2021REST
Tue, 27 Jul 2021OTHER
Wed, 28 Jul 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:35:00
Thu, 29 Jul 2021OTHER
Fri, 30 Jul 2021REST
Sat, 31 Jul 2021OTHER
 
Peter, thank you SO much, that is so neat and works perfectly (yes, those cells were where I was looking to place the results - apologies for misunderstanding)

Dave, thanks for your help and perseverance too - my apologies for not being able to grasp it all.

Best regards

Paul
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,214,983
Messages
6,122,582
Members
449,089
Latest member
Motoracer88

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