Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Another Excel ? Multi Worksheets

Posted on 2011-02-24
8
Medium Priority
?
179 Views
Last Modified: 2012-05-11
I now have three worksheets

Cover - the glossy view of sums
data - raw data of job entries
monthly - monthly budget for jobs
xhour - hours spent on each job

the question is I would like to fill a cell on Cover with the sum of all hours in xhour but the kicker is need to do it by segment.  There is a one to one corelation between job ids in xhour and monthly but on monthly there is a column called segment.

So for segment = walmart match all soebel IDs from Monthly to xhours and sum hours.
0
Comment
Question by:Matt Pinkston
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 34973080
You could use SUMPRODUCT() function to sum based on conditions. Have a look at my article that explains the principles of this function:

http://excel-user.blogspot.com/2009/10/sumproduct-sum-values-based-on.html

Or if you have Excel 2010 you could try SUMIFS():

http://excel-user.blogspot.com/2011/02/sumif-and-sumifs-functions.html

jppinto
0
 
LVL 33

Expert Comment

by:jppinto
ID: 34973085
If you need aditional help, you could post a sample sheet for us to take a look.

jppinto
0
 

Author Comment

by:Matt Pinkston
ID: 34975132
here is a sample file test.xlsx
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 50

Expert Comment

by:barry houdini
ID: 34975170
Hello pinkstonmp, you want a formula for B3? What should the result be for your sample, I can't work out if you are taking numbers from monthly or xhours or both....

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34975227
as a starting point this formula will sum the values in xhours in the rows where the job matches the "walmart jobs" in the data sheet

=SUM(IF(ISNUMBER(MATCH(xhours!A2:A5,IF(data!C2:C5="walmart",data!A2:A5),0)),xhours!B2:B5))

it's an "array formula" that needs to be confirmed with CTRL+SHIFT+ENTER so that curly braces appear around the formula, see attached

regards, barry
26845779.xlsx
0
 

Author Comment

by:Matt Pinkston
ID: 34976263
tried this and it did not work:
=SUM(IF(ISNUMBER(MATCH(hours!A2:A25000,IF(data!H2:H5000="defense",data!B2:B5000),0)),hours!I2:I25000))

Updated xls to match  testx.xlsx testx.xlsx
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 34978431
That formula works for me, in as much as it gives me the total I expected.

The formula is an arry formula as I said, that means it needs to be entered in a specific way - did you do that?

Paste formula in cell. Press F2 key to select formula then hold down CTRL and SHIFT keys and at the same time press ENTER. Curly braces like { and } should appear around the formula in the formula bar. If you change the formula you'll need to do that again.

I also realised that there is a shorter formula you could use, i.e.

=SUM(SUMIF(hours!A2:A25000,IF(data!H2:H5000="defense",data!B2:B5000),hours!I2:I25000))

That formula also needs to be "array entered". See attached, I've used both (on Cover sheet) for the same result. I get 79221 for your example because it sums I3 and I5 from the hours sheet - is that the result you expected?

regards, barry
test-barry.xlsx
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34978468
Typo alert:

"arry formula" should, of course, be "array formula"

barry
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

604 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