View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mikus Mikus is offline
external usenet poster
 
Posts: 33
Default SUMIF which work's with multiple sheets

I need to calculate total hours spent on particular task.
I have:
1) Sheet called "tasks" which contains Task name and Task ID
2)1 sheet for each day i worked in office. So usually i have ~22 sheets.
Each of these sheets contain TaskID i worked on and hours i spent on this
task. I name theese sheets after month's day. For example if today is
thursday 4th of august i create sheet called "4" and then on friday i create
sheet called "5" and then i come to office again in monday and create sheet
called "8" and so on... sometimes i work in weekend's too and to identify
weekend day sheets i enclose weekend days with straight lines - "|". For
example if i would work on saturday 6th of agust i would call this sheet "|6|"

What i want to do is perform calculation for each sheet and have total hours
in Task sheet's column E. Task sheets column A contains ID.

If i only had to sum tasks for 1 sheet then i could easily do this with
SUMIF formula, but how do i do this for all the tabs ?

I came up with idea that i need a macro that would do all the calculations
each time i activate sheet "tasks" ... only i am not sure about performance...
maybe it is possible with formulas somehow ?

Additional info:
1)there will never be more than 31 sheet from which to sum up data, cuz
there is only 31 day in month
2)all sheets which contains data are ALWAYS located to the left from sheet
named "blank"
example 1,2,3,4,5,|6|,8,9,10,11,12,...,31,blank
3)i create that day's sheet each day by running macro which copies all data
from sheet named blank and names sheet accordingly (as i explained above)
5)i won't have more than 50 tasks in one month - so there will be on average
30-40 task ID's for which to do calculation

To better understand what i am trying to accomplish i will leave copy of my
workbook he http:\\www.svara-kontrole.lv\timer_example.xls