Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Bryan Hessey
 
Posts: n/a
Default Column matching - sorting. Fairly hard problem, I think.


After you produce the Updated sheet,

Format column C, W, X, Y and Z as [hh]:mm:ss
Format column S, T, U and V as number, no decimal places.

In S2 put the formula

=IF($B2="","",IF(N2=0,S1,IF($C2<$C1,1,IF(S1="",1, S1+1))))

and formula drag that acros T2, U2 and V2

In W2 put the formula

=IF($B2="","",IF(N2=0,W1,IF($C2<$C1,N2,IF(W1="",N 2,W1+N2))))

and formula drag that across X2, Y2 and Z2

Select (highlight) S2-Z2 and formula drag the 8 column formula to the
end of your data.

This gives you the Count of items per 15 minute period, and the Sum per
15 minute period, you need to divide W2 by S2, X2 by T2, Y2 by U2 and Z2
by V2 etc to obtain the average.

Hope this helps
--

Bryan Hessey Wrote:
Adam,

The attached should produce the required sheet as per the code supplied
by Toppers, and the column K fix.

Simply Tools, Macros, Macro and Run the macro.

This will populate the new worksheet.

To do this to other worksheets you need to copy the macro and amend the
names of the sheets on lines 5 and 6.

To see the code you can:
1. press Alt/F11 or
2. rightmouse the sheet-name-tab and select View Code or
3. Tools, Macros, Macro, Edit

Select and copy all of the code, and 'view code' on the next sheet and
Paste the code.
Insert a new sheet and rename it to 'Updated ~~~ etc' then within the
just pasted locate and amend the two sheetnames to be the sheets you
are now using.

Then Tools, Macros, Macro and select and run the new copy.

This should re-produce the the workbook that Toppers sent you, and you
can then do the remaining workbooks.

Am still testing how to average over 15 min periods.

also, you need to format column C to [hh]:mm:ss

Bryan



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=530452

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
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
IF/AND/OR/DATEIF Issue...sorry...long post... EDSTAFF Excel Worksheet Functions 1 November 10th 05 12:28 AM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
sorting cells according to all cells in column A Jootje Excel Worksheet Functions 2 August 16th 05 01:40 PM
Adding a KeyID column for sorting Rebecca New Users to Excel 3 February 20th 05 07:09 PM


All times are GMT +1. The time now is 07:42 AM.

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

About Us

"It's about Microsoft Excel"