Solved

Excel Sumifs Formula

Posted on 2011-03-22
12
381 Views
Last Modified: 2012-05-11
Good morning,

I have a problem that I can't seem to figure out. I have attached a same section of the spreadsheet i am working on.

I need to write a formula that sum's column J on the "F-30 Data" tab. The formula is based on Sheet 1 so I put some place holders.

What I need is the formula to go out to that F-30 data tab,

1 - Look at column "A" if it is equal to 1334509
2 - Look at column "E" if it is equal to Z00
3 - Look at Column "N" if it is equal to "Saturday" or "Sunday"
4 - Look at Column "L" if it is not equal to 22 or 24 (so it would include everything else)

then sum column Column J.

I have tried everything and can't seem to get it to work.
book1.xls
0
Comment
Question by:dn920
  • 4
  • 3
  • 2
  • +2
12 Comments
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35190422
type this in the cell:

=SUM(('F-30 Data'!A2:A150*1=$B$5*1)*('F-30 Data'!E2:E150="Z00")*(('F-30 Data'!N2:N150="Saturday")+('F-30 Data'!N2:N150="Sunday"))*('F-30 Data'!L2:L150<>22)*('F-30 Data'!L2:L150<>24)*'F-30 Data'!J2:J150)

Then close with Ctrl+Shift+Enter
0
 
LVL 5

Expert Comment

by:Angelgeo
ID: 35190425
=SUBTOTAL(9,'F-30 Data'!J2:J116)
book1.xls
0
 

Author Comment

by:dn920
ID: 35190665
Fernando,

I entered that, and am getting a result of 0, logically I can see what you are doing and it should be giving the result, but I am not sure why its coming back with a 0
0
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35190711
Did you finish with Ctrl+Shift+Enter instead of just Enter ?
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 250 total points
ID: 35190723
The trick when you have multiple "<>"s is to apply those separately in SUMIFS, this formula should give you the required result

=SUM(SUMIFS('F-30 Data'!J:J,'F-30 Data'!A:A,B5,'F-30 Data'!N:N,{"Saturday","Sunday"},'F-30 Data'!E:E,"Z00",'F-30 Data'!L:L,"<>22",'F-30 Data'!L:L,"<>24"))

regards, barry
0
 
LVL 6

Assisted Solution

by:FernandoFernandes
FernandoFernandes earned 250 total points
ID: 35190730
see the attached file with the solution
book1.xls
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:dn920
ID: 35190746
Ok I did not do the crtl shift and enter sorry, but when I did that just now it throws {} around the entire thing and shows N/A giving me an error. this wouldn't be another perk of 2007 would it?
0
 

Author Comment

by:dn920
ID: 35190794
Fernando and Berry both are working, thanks so much for your assistance on this, looking at what you all put together makes sense to me I was trying to do too much at once instead of spreading it out.


Thanks!!
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35190797
You can use SUMIFS as per my suggestion above - then you don't need CSE......another (shorter) option would be to sum just for days beginning with "S", i.e.

=SUMIFS('F-30 Data'!J:J,'F-30 Data'!A:A,B5,'F-30 Data'!N:N,"S*",'F-30 Data'!E:E,"Z00",'F-30 Data'!L:L,"<>22",'F-30 Data'!L:L,"<>24")

regards, barry
0
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35190804
When you finish the formula with Ctrl+Shift+Enter, you're telling Excel to understand that you're writing an array formula instead of a simple formula. Those { } at the edges means Excel will work differently with the formula. I don't understand why you're getting #N/A... can you post your file again, with the formula? Or, you can also see the example that I posted...

also, try to use Barry's solution.
0
 
LVL 18

Expert Comment

by:krishnakrkc
ID: 35190862
Hi,

=SUM(SUMIFS('F-30 Data'!J:J,'F-30 Data'!N:N,{"Saturday","Sunday"},'F-30 Data'!E:E,"Z00",'F-30 Data'!L:L,{"<>22","<>24"}))

Kris
0
 
LVL 18

Expert Comment

by:krishnakrkc
ID: 35190875

Sorry, didn't see the replies. :(



0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This collection of functions covers all the normal rounding methods of just about any numeric value.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

863 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

23 Experts available now in Live!

Get 1:1 Help Now