Author Topic: Excel time help  (Read 622 times)

Tim Hall

  • Victoria is my queen
Excel time help
« on: 26 October, 2011, 08:14:05 pm »
Mrs. Hall is struggling at what for her is the deep end of the Excel swimming pool.

She has a table.  Column A has a date and time string, entries 15 minutes apart.
Column B has data corresponding to the date stamp in column A.
She wants to calculate the average of column B every hour and put it in the relevant cell in column C

She's had a look at DATEDIF but that doesn't sem to do the job.

Any ideas?

EDIT: She's cracked the "average these 4 cells" bit. It's the conditional "on the top of the hour" bit that's a pain.
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Re: Excel time help
« Reply #1 on: 26 October, 2011, 08:40:16 pm »
Haven't got excel in front of me, which makes this difficult.

Can you add another column which either rounds the date/time (to give hour)  -  or isn't there an "hour part" function in there?  datetime(hour)?

Then use that column to constrain which data goes into the average.

Tim Hall

  • Victoria is my queen
Re: Excel time help
« Reply #2 on: 26 October, 2011, 08:48:51 pm »
Nutty, thanks for the suggestion. Stand down, everyone. I think she's cracked it. 

IF (MINUTE(A5=0) (AVERAGE b1:b4), (" ")  or something like it, give or take the odd bracket and comma.
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)