Good title !
There are several approaches, but before doing anything better to include
additional helper columns for totals. Probably best to have a separate col
for each day, eg
say you have Mon Start/End times in B2:C2
=IF(C2,C2-B2,0)
Then include a grand total column to sum the day totals.
Say your JobNumbers are in col-A and Grand Total in col-H (probably it'll be
further to the right)
Select data in col-A, Data/Filter/Advanced Filter
Copy to another location and check unique records
copy to say J1
Hopefully you've now got a unique list in col-J
With Grand Totals in col-H and unique Jobs in J,
in K2: =SUMPRODUCT(--($A$2:$A$7=J2)*$H$2:$H$7)
and copy down
Better to use Local worksheet names for those references, eg
Sheet1!Jobs and Sheet1!TTime
You could record a macro to do the advanced filter (use the name Jobs for
the advanced Filter list), and populate the formulas.
Of course there are other ways, perhaps the most obvious is a Pivot Table
(if you end up with 'Count of' rt-click the counted data, Field settings and
choose Sum)
Regards,
Peter T
most obvious that comes to mind is a PivotTable
"Mr. Haney" wrote in message
...
This was brought over from the 'functions' group.
I think I need a combination of a sub, and the use of SUMPRODUCT.
Any ideas?
OK... Here is what I want, and it boils down to me not knowing how to
handle the test code, not so much the tally.
I have a sheet with data that starts with a text column that has job
numbers in it.
The sheet is a fixed length (number of rows), meant to be printed out
on a weekly basis,
so there are always blank lines on the sheet that have no data in this
first aforementioned column.
Job Number Mon Time Start Mon Time End Tues Start Tues End
TextSamp1 06:00 08:30
TextSamp2 08:30 10:30
Meal 10:30 11:30
TextSamp1 11:30 15:30
TextSamp2 15:30 17:30
With several blank lines following these
I want to do a "For Each" non-blank example of job number, SumProduct
the time accruals, skipping the blank lines.
With a result that lists the job numbers worked in that day, and the
total time put toward that job number.
Job Number Mon Time Total
TextSamp1 6.5 Hrs
TextSamp2 4.0 Hrs
Meal 0.5 Hrs
I know this is easy, but I just cannot find an example for what I want.
I will do it on a separate tally sheet, and perhaps even from a
different workbook where I query the date coded file names as:
task_track_041809.xls for the week of 04-18-09.
It would seem that I could do it on an included sheet macro free, but
the separate workbook would require VB code, but I am not sure. They
both might need it to perform the test criteria cycling.
Thank you for any assistance in this endeavor.
On Sun, 19 Apr 2009 15:05:57 -0700, Mr. Haney
wrote:
Hi guys...
I am looking for advice as to which function(s) to use he
I have a sheet where I keep track of time put toward job tasks at
work.
I look up the job number from a sheet where I keep said numbers.
I jump around from task to task at work and from day to day. So all
of
the time put towards a single job number may be listed on the sheet
across several rows throughout a given day or through the week.
My per row (per job entry) time tally works fine, and my per column
(per day) tally works fine, all contained on that one sheet. I want to
make a final tally sheet that queries all the entries made in a given
day
(column) for each job number listed in my leftmost column, where the
duplicate entries would be so that I end up with a per job tally that
shows all hours worked on each job each day.
So I need to sum the hours with a for each type thing.
I can build the sheet/table, but I want to know what the best
function
is to query my task tracking sheet.
So, I will make seven tally sheets, one for each day, that lists only
the jobs worked on in that day, and its totals.
My current sheet has no problem with my overall daily tally or my
weekly tally, but I have yet to construct the daily tally sheets.