Solved

Formula to Add critiera - SUMIFS?

Posted on 2013-01-15
10
206 Views
Last Modified: 2013-01-15
hello,

I am trying to write a formula which adds a total number of hours for a particular person for each month -ie. a monthly total.

I have been playing with the use of a SUMIFS forumlas so I can use multiple criteria but I have not been able to write it with much luck!..

Is SUMIFS the best way to approach this requirements?

I hope the spreadsheet makes sense ;)
Hours-Total-Sheet---Example.xlsx
0
Comment
Question by:gisvpn
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 5

Expert Comment

by:LazyFolk
ID: 38777351
try this :

=SUMIF(B1:B143;"=Jim";C1:C143)

replace "=Jim" with "=Amy" for Amy's hours
0
 
LVL 16

Expert Comment

by:Peter Kwan
ID: 38777359
You may use SUMPRODUCT.

For example:

Total for Nov for Jim = SUMPRODUCT((A:A>=DATEVALUE("1/11/2012"))*(A:A<=DATEVALUE("30/11/2012"))*(B:B=F6),C:C )
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 38777370
isn´t it Pivot table suitable for you enough?
Just use pivot table filter to show months (I added one column to your table with month number)
Copy-of-Hours-Total-Sheet---Exam.xlsx
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 38777395
or maybe this is how you wanted to have it with SUMIFS (one date is missing in your table so SUM of C rows is not the same as SUM of data after SUMIFS)
Copy-of-Hours-Total-Sheet---Exam.xlsx
0
 

Author Comment

by:gisvpn
ID: 38777534
thank you all for your posts.

pkwan
Do you know If I can use within SUMPRODUCT the DateValue function with the date being referenced in another cell, for example :

DATEVALUE(J5)

I cannot seem to get it to work this way if I were to reference the start and end dates from another cell, I was just trying to think of another way to speed up writting the cells ;)


helpfinder
thank you for your posts also.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 16

Expert Comment

by:Peter Kwan
ID: 38777657
Hi, gisvpn,

Is there any example that you tried not working?
0
 

Author Comment

by:gisvpn
ID: 38777682
sure please see attached
Hours-Total-Sheet---Example---wi.xlsx
0
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 250 total points
ID: 38777701
You don't need datevalue in this case.  DATEVALUE function is for converting a text value to a date value. Since your G4, G5 are already date value, there is no need to use this function.

Just  the following should work.

= SUMPRODUCT((A:A>=G4)*(A:A<=G5)*(B:B=F6),C:C )
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 250 total points
ID: 38777787
.....SUMIFS would probably be preferable though - it'll certainly be more efficient if you are referencing whole columns. The SUMIFS version would look like this for G6 copied down

=SUMIFS(C:C,A:A,">="&G$4,A:A,"<="&G$5,B:B,$F6)

regards, barry
0
 

Author Comment

by:gisvpn
ID: 38777819
Hi barryhoudini,

You're right, it makes a HUGE difference! thank you for the revision ;) It runs in a fraction of the time now ;)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now