Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RD975
 
Posts: n/a
Default EXCEL Sum column based on time range in different column?

Have spreadsheet that contains column with timestamp and another with count.
Would like to summarize total counts based on hourly interval. Sample
spreadsheet:
00:01:05 10
00:02:10 20
01:05:00 999
02:00:01 9
..
..
..
Would like to total all counts for HOUR(0) "30 another for HOUR(1) "999"
another for HOUR(2) "9" etc.

Thanks

  #2   Report Post  
Richard Buttrey
 
Posts: n/a
Default

On Thu, 13 Oct 2005 08:51:06 -0700, "RD975"
wrote:

Have spreadsheet that contains column with timestamp and another with count.
Would like to summarize total counts based on hourly interval. Sample
spreadsheet:
00:01:05 10
00:02:10 20
01:05:00 999
02:00:01 9
.
.
.
Would like to total all counts for HOUR(0) "30 another for HOUR(1) "999"
another for HOUR(2) "9" etc.

Thanks


One way is a SUMPRODUCT formula

Assuming your data above is in A1:B4,

In D1:D24 fill in the values 0 -- 24

Then in E1 enter
=SUMPRODUCT((HOUR(A1:A4)=D1)*(B1:B4))
and copy down to E24

Change the A:B range to fit your data.

HTH



__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #3   Report Post  
Gary''s Student
 
Posts: n/a
Default

If your data is in cols A&B, then insert a helper column. In C1 enter
=HOUR(A1) and copy down. You will see:

time count hour
0:01:05 10 0
0:02:10 20 0
1:05:00 999 1
2:00:01 9 2
Then construct a Pivot Table using sumof count in the data field and hour
in the row field.
--
Gary''s Student


"RD975" wrote:

Have spreadsheet that contains column with timestamp and another with count.
Would like to summarize total counts based on hourly interval. Sample
spreadsheet:
00:01:05 10
00:02:10 20
01:05:00 999
02:00:01 9
.
.
.
Would like to total all counts for HOUR(0) "30 another for HOUR(1) "999"
another for HOUR(2) "9" etc.

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Time Manipulation BFiedler Excel Discussion (Misc queries) 0 September 15th 05 01:15 AM
How to Join/concatenate a date field with a time field in Excel? Alan Excel Discussion (Misc queries) 4 August 9th 05 10:07 PM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
Count cells based on date range in another column [email protected] New Users to Excel 1 May 5th 05 08:11 PM
Excel countif based on size of numbers in one column in Access Kristjan_Thor Excel Worksheet Functions 3 March 17th 05 10:21 PM


All times are GMT +1. The time now is 09:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"