Adding a new time causes wrong average

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,691
Office Version
  1. 365
Platform
  1. Windows
This is the first 2 columns of table. The cell in question is the average in C59 with the value "10:24a". In the second mini-sheet below, I added one row with a time of 11:51a and the average, now in C60, became "1:34a". What have I done wrong now?

Blood glucose readings.xlsx
BC
5DateTime
6Mon 01/01/242:51p
7Tue 01/02/248:47a
8Wed 01/03/2410:25a
9Thu 01/04/248:43a
10Fri 01/05/248:15a
11Sat 01/06/2410:32a
12Sun 01/07/249:46a
13Mon 01/08/249:29a
14Tue 01/09/24
15Wed 01/10/244:24p
16Thu 01/11/247:54a
17Fri 01/12/248:01a
18Sat 01/13/248:25a
19Sun 01/14/249:10a
20Mon 01/15/242:08p
21Tue 01/16/24
22Wed 01/17/249:47a
23Thu 01/18/2410:17a
24Fri 01/19/248:33a
25Sat 01/20/248:11a
26Sun 01/21/24
27Mon 01/22/247:52a
28Tue 01/23/242:15p
29Wed 01/24/249:24a
30Thu 01/25/24
31Fri 01/26/2410:03a
32Sat 01/27/249:12a
33Sun 01/28/249:05a
34Mon 01/29/246:15a
35Tue 01/30/2412:14p
36Wed 01/31/2410:48a
37Thu 02/01/249:06a
38Fri 02/02/2410:37a
39Sat 02/03/2410:16a
40Sun 02/04/24
41Mon 02/05/2411:22p
42Tue 02/06/246:03p
43Wed 02/07/2410:31a
44Thu 02/08/24
45Fri 02/09/249:21a
46Sat 02/10/249:07a
47Sun 02/11/2410:34a
48Mon 02/12/2410:25a
49Tue 02/13/247:29a
50Wed 02/14/2410:37a
51Thu 02/15/2411:01a
52Fri 02/16/248:12a
53Sat 02/17/249:42a
54Sun 02/18/249:50a
55Mon 02/19/248:58a
56Tue 02/20/2410:32a
575145
58Earliest6:15a
59Average10:24a
60Latest2:08p
20240101
Cell Formulas
RangeFormula
B7:B56B7=OFFSET([@Date],-1,0)+1
B57B57=SUBTOTAL(103,[Date])
C57C57=SUBTOTAL(102,[Time])
C58C58=MIN(Table1[Time])
C59C59=AVERAGE(Table1[Time])
C60C60=MAX(Table1[Time])


Second table:

Blood glucose readings.xlsx
BC
5DateTime
6Mon 01/01/242:51p
7Tue 01/02/248:47a
8Wed 01/03/2410:25a
9Thu 01/04/248:43a
10Fri 01/05/248:15a
11Sat 01/06/2410:32a
12Sun 01/07/249:46a
13Mon 01/08/249:29a
14Tue 01/09/24
15Wed 01/10/244:24p
16Thu 01/11/247:54a
17Fri 01/12/248:01a
18Sat 01/13/248:25a
19Sun 01/14/249:10a
20Mon 01/15/242:08p
21Tue 01/16/24
22Wed 01/17/249:47a
23Thu 01/18/2410:17a
24Fri 01/19/248:33a
25Sat 01/20/248:11a
26Sun 01/21/24
27Mon 01/22/247:52a
28Tue 01/23/242:15p
29Wed 01/24/249:24a
30Thu 01/25/24
31Fri 01/26/2410:03a
32Sat 01/27/249:12a
33Sun 01/28/249:05a
34Mon 01/29/246:15a
35Tue 01/30/2412:14p
36Wed 01/31/2410:48a
37Thu 02/01/249:06a
38Fri 02/02/2410:37a
39Sat 02/03/2410:16a
40Sun 02/04/24
41Mon 02/05/2411:22p
42Tue 02/06/246:03p
43Wed 02/07/2410:31a
44Thu 02/08/24
45Fri 02/09/249:21a
46Sat 02/10/249:07a
47Sun 02/11/2410:34a
48Mon 02/12/2410:25a
49Tue 02/13/247:29a
50Wed 02/14/2410:37a
51Thu 02/15/2411:01a
52Fri 02/16/248:12a
53Sat 02/17/249:42a
54Sun 02/18/249:50a
55Mon 02/19/248:58a
56Tue 02/20/2410:32a
57Wed 02/21/2411:51a
585246
59Earliest6:15a
60Average1:34a
61Latest2:08p
20240101
Cell Formulas
RangeFormula
B7:B57B7=OFFSET([@Date],-1,0)+1
B58B58=SUBTOTAL(103,[Date])
C58C58=SUBTOTAL(102,[Time])
C59C59=MIN(Table1[Time])
C60C60=AVERAGE(Table1[Time])
C61C61=MAX(Table1[Time])
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I think your time values also have dates in them and some do not.

Book2
ABCDEFGHI
1
2
3
4
5DateTimeDateTime
64529245292.618754529245292.618752024-01-012024-01-01 14:51:00
7=OFFSET([@Date],-1,0)+145293.365974529345293.365972024-01-022024-01-02 08:47:00
8=OFFSET([@Date],-1,0)+145294.434034529445294.434032024-01-032024-01-03 10:25:00
9=OFFSET([@Date],-1,0)+145295.363194529545295.363192024-01-042024-01-04 08:43:00
10=OFFSET([@Date],-1,0)+145296.343754529645296.343752024-01-052024-01-05 08:15:00
11=OFFSET([@Date],-1,0)+145297.438894529745297.438892024-01-062024-01-06 10:32:00
12=OFFSET([@Date],-1,0)+145298.406944529845298.406942024-01-072024-01-07 09:46:00
13=OFFSET([@Date],-1,0)+145299.395144529945299.395142024-01-082024-01-08 09:29:00
14=OFFSET([@Date],-1,0)+1453002024-01-091900-01-00 00:00:00
15=OFFSET([@Date],-1,0)+145301.683334530145301.683332024-01-102024-01-10 16:24:00
16=OFFSET([@Date],-1,0)+145302.329174530245302.329172024-01-112024-01-11 07:54:00
17=OFFSET([@Date],-1,0)+145303.334034530345303.334032024-01-122024-01-12 08:01:00
18=OFFSET([@Date],-1,0)+145304.350694530445304.350692024-01-132024-01-13 08:25:00
19=OFFSET([@Date],-1,0)+145305.381944530545305.381942024-01-142024-01-14 09:10:00
20=OFFSET([@Date],-1,0)+145306.588894530645306.588892024-01-152024-01-15 14:08:00
21=OFFSET([@Date],-1,0)+1453072024-01-161900-01-00 00:00:00
22=OFFSET([@Date],-1,0)+10.407638889453080.4076388892024-01-171900-01-00 09:47:00
23=OFFSET([@Date],-1,0)+10.428472222453090.4284722222024-01-181900-01-00 10:17:00
24=OFFSET([@Date],-1,0)+10.35625453100.356252024-01-191900-01-00 08:33:00
25=OFFSET([@Date],-1,0)+10.340972222453110.3409722222024-01-201900-01-00 08:11:00
26=OFFSET([@Date],-1,0)+1453122024-01-211900-01-00 00:00:00
27=OFFSET([@Date],-1,0)+10.327777778453130.3277777782024-01-221900-01-00 07:52:00
28=OFFSET([@Date],-1,0)+10.59375453140.593752024-01-231900-01-00 14:15:00
29=OFFSET([@Date],-1,0)+10.391666667453150.3916666672024-01-241900-01-00 09:24:00
30=OFFSET([@Date],-1,0)+1453162024-01-251900-01-00 00:00:00
31=OFFSET([@Date],-1,0)+10.41875453170.418752024-01-261900-01-00 10:03:00
32=OFFSET([@Date],-1,0)+10.383333333453180.3833333332024-01-271900-01-00 09:12:00
33=OFFSET([@Date],-1,0)+10.378472222453190.3784722222024-01-281900-01-00 09:05:00
34=OFFSET([@Date],-1,0)+10.260416667453200.2604166672024-01-291900-01-00 06:15:00
35=OFFSET([@Date],-1,0)+10.509722222453210.5097222222024-01-301900-01-00 12:14:00
36=OFFSET([@Date],-1,0)+10.45453220.452024-01-311900-01-00 10:48:00
37=OFFSET([@Date],-1,0)+10.379166667453230.3791666672024-02-011900-01-00 09:06:00
38=OFFSET([@Date],-1,0)+10.442361111453240.4423611112024-02-021900-01-00 10:37:00
39=OFFSET([@Date],-1,0)+10.427777778453250.4277777782024-02-031900-01-00 10:16:00
40=OFFSET([@Date],-1,0)+1453262024-02-041900-01-00 00:00:00
41=OFFSET([@Date],-1,0)+10.973611111453270.9736111112024-02-051900-01-00 23:22:00
42=OFFSET([@Date],-1,0)+10.752083333453280.7520833332024-02-061900-01-00 18:03:00
43=OFFSET([@Date],-1,0)+10.438194444453290.4381944442024-02-071900-01-00 10:31:00
44=OFFSET([@Date],-1,0)+1453302024-02-081900-01-00 00:00:00
45=OFFSET([@Date],-1,0)+10.389583333453310.3895833332024-02-091900-01-00 09:21:00
46=OFFSET([@Date],-1,0)+10.379861111453320.3798611112024-02-101900-01-00 09:07:00
47=OFFSET([@Date],-1,0)+10.440277778453330.4402777782024-02-111900-01-00 10:34:00
48=OFFSET([@Date],-1,0)+10.434027778453340.4340277782024-02-121900-01-00 10:25:00
49=OFFSET([@Date],-1,0)+10.311805556453350.3118055562024-02-131900-01-00 07:29:00
50=OFFSET([@Date],-1,0)+10.442361111453360.4423611112024-02-141900-01-00 10:37:00
51=OFFSET([@Date],-1,0)+10.459027778453370.4590277782024-02-151900-01-00 11:01:00
52=OFFSET([@Date],-1,0)+10.341666667453380.3416666672024-02-161900-01-00 08:12:00
53=OFFSET([@Date],-1,0)+10.404166667453390.4041666672024-02-171900-01-00 09:42:00
54=OFFSET([@Date],-1,0)+10.409722222453400.4097222222024-02-181900-01-00 09:50:00
55=OFFSET([@Date],-1,0)+10.373611111453410.3736111112024-02-191900-01-00 08:58:00
56=OFFSET([@Date],-1,0)+10.438888889453420.4388888892024-02-201900-01-00 10:32:00
57=SUBTOTAL(103,[Date])=SUBTOTAL(102,[Time])Total14093.43378
58Earliest0.260416667
59Average14093.43378
60Latest45306.58889
Sheet1
Cell Formulas
RangeFormula
H6:H56H6=TEXT(Table1[@Date],"yyyy-mm-dd")
I6:I56I6=TEXT(Table1[@Time],"yyyy-mm-dd hh:mm:ss")
E7:E56E7=OFFSET([@Date],-1,0)+1
F57F57=SUBTOTAL(1,[Time])
B58B58=MIN(Table1[Time])
B59B59=AVERAGE(Table1[Time])
B60B60=MAX(Table1[Time])
 
Upvote 1
Solution
You're welcome. Happy to help. Everyone makes them once in a while.

Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,147
Members
453,021
Latest member
Justyna P

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