Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Sub-Totals within dynamic times

Worksheet function?

=SUMPRODUCT((A1:A100="PD")*(B1:B100=4)*(B1:B100<= 7)*(C1:C100="Sampling"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Simon Thwaites" wrote in message
...
I have 5000 rows in data in the following format with 6 positions, 16

weeks and 12 activities:

Position Week Activity Hours
PD 1 Sampling 2
AD 2 PM 3
PD 3 Analysis 2
AD 4 Analysis 1
SPM 5 PM 2
SPM 2 PM 4.5
PD 3 Sampling 6
RE 2 Analysis 5.5
RE 2 PM 8.4
SPM 5 Analysis 3
SPM 5 Analysis 4
PD 3 Analysis 3
AD 2 PM 3
AD 1 Sampling 3
PD 1 Sampling 3
PD 1 PM 1
AD 2 Analysis 4
AD 2 PM 9
AD 2 Analysis 11

I need to write a macro which can work out, for example, the amount of

time spent by PDs on Sampling between
week 4 and 7.
Currently I have loads of DSums stored and it works but highly laborious.
Can I write a macro which loops through cells and for example dumps

sub-totals in cells,
for AD time spent on Sampling
PD time spent on Analysis within a particular timescale etc.etc.




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
Pivot Totals: Group totals different from Grand totals PsyberFox Excel Discussion (Misc queries) 1 February 13th 08 06:16 PM
how to enter totals and sub totals from receipts into excel. mjd23 New Users to Excel 2 January 11th 08 01:54 AM
Summing Weekly Totals into Monthly Totals steph44haf Excel Worksheet Functions 3 July 5th 06 04:51 PM
Comparing/matching totals in a column to totals in a row Nicole L. Excel Worksheet Functions 3 January 27th 05 10:42 PM
Percent Totals by Dynamic groups axapta[_2_] Excel Programming 6 April 18th 04 07:36 AM


All times are GMT +1. The time now is 04:34 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"