Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sumif for Current Week

Status
Not open for further replies.

Petzl

Technical User
Jul 10, 2002
114
AU
Hi,

I have the following data:

Date Hours
1/1/04 5
1/2/04 6
5/2/04 10

am trying to use a sumif function to determine at a glance the number of hours I have worked in the current week. Is this possible? Is the sumif the right function?

Thanks for you help,

Petzl
 
with the sample data you have provided a simple SUM would do the trick but I suspect it's not as easy as that. Can you please be more specific with the sample data?
 
You'll need to add another column to get the week using WEEKNUM - then just do a SUMIF on that

Rgds, Geoff

"Having been erased. the document thjat you are seeking. Must now be retyped"

Please read FAQ222-2244 before you ask a question
 
I'm assuming you have a whole range of dates somewhere that you will be referencing and personally I would probably throw a Pivot table at it, but to answer your specific question, try something like this:-

=SUMIF(A2:A200,">"&(TODAY()-WEEKDAY(TODAY())),B2:B200)

Assumes your week starts on a Sunday and that you have no hours listings later than the current week in your data (eg no projected hours etc)

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
KenWright,

Brilliant....just what I needed! Simple and to the point. I will investigate your suggestion for a pivot table as well.

Thanks,

Petzl!
 
You're welcome :)

Nice intro to Pivot tables here:-


Regards
Ken...............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top