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

x
?
Solved

Office / Excel 2010 Formula Query

Posted on 2011-03-08
14
Medium Priority
?
328 Views
Last Modified: 2012-08-14
I'm having a problem with formula's on Excel. I'm not too hot on it and I only know the basics..

I've created a spreadsheet for keeping track of company purchases, on the credit card, cash, cheque, paypal, etc.

I currently only have the knowledge on the SUM() formula, however I would like to calculate the total amount spent on each payment method (Chosen in the right-hand column).

Does anyone know how I can get this to work? :-)
0
Comment
Question by:UncleVirus
[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
14 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 35068066
If those values i.e. credit card, cash. cheque, paypal, etc. are in one column, you can use the Subtotal function.

see the link below on how to do it:

http://office.microsoft.com/en-us/excel-help/insert-subtotals-in-a-list-of-data-in-a-worksheet-HP010342620.aspx

Sincerely,
Ed
0
 
LVL 50
ID: 35068114
Hello,

if you could post a sample spreadsheet that shows your data layout, it would be much easier to suggest a formula or method to sum your data in your specific workbook.

There are several possibilities to sum data by category, for example a Pivot table, which can be constructed with just a few clicks and without entering any formulas, or a formula solution which could use any of these: Sumif(), Sumifs(), Sumproduct(), Subtotal().

It really depends how your data is arranged and what you want to show. So, please post a workbook with some dummy data and explain what you would want the result to look like.

cheers, teylyn
0
 
LVL 6

Expert Comment

by:TinTombStone
ID: 35068139
Try the SumIf() function

This adds all the entries in on column that match a given entry in another column

So it the Payment types were in cells A1 to A100
And the payment ammounts were in cells B1 to B100

to sum all 'Card' Payments

=SumIf(A1:A100, "Card", B1:B100)

the second argument, Criteria, could be changed to a cell address of course

So in A110 we enter "Card", and change the formula to

=SumIf(A1:A100, A120, B1:B100)

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 35068173
If your data is stored in a simple table, with one entry per row, a Pivot table will be the most efficient way to analyse it. No need to enter formulas.

Click in the data table, then click Insert > Pivot table. Drag the field that has the payment type to the row area and drag the amount to the Values area. Right click that value field and change the field settings to "Sum" if it is not automatically doing this.

And there's your analysis. No formulas, and all payment types in your original data are accounted for.

See attached sample file. The pivot table took me 4 mouse clicks to create. No formulas.

cheers, teylyn
Book2.xlsx
0
 
LVL 1

Author Comment

by:UncleVirus
ID: 35068234
Still rather confused, I had a few goes but broke it superbly teylyn;

See screenshot for where I'm at :-)
Capture.JPG
0
 
LVL 50
ID: 35068308
Hello,

I wrote a whole raft and then EE went offline when I posted. Arghh.

Put your cursor in a cell between C3 and I15, then select Insert > Pivot table.

You will see the marching ants around your data table. Click OK to start the pivot table in a new sheet.

On the right, you will see the pivot table side panel.

Click the "Payment Method" field in the side panel and drag it to the "Row Labels" area below.

Click the "Amount Inc VAT" field in the side panel and drag it to the "Values" area below.

If the Values area field now says "Sum of Amount ...", you're done. If it says "Count of Amount ..." click the drop down arrow in the Values area, click "Value Field Settings", select "Sum" and you're done.

If that does not help, please post your workbook instead of a screenshot. I will then create the pivot table for you and will document each step with a screenshot.

cheers, teylyn
0
 
LVL 1

Author Comment

by:UncleVirus
ID: 35068682
That's absolutely spot-on teylyn - and yes I've never ever seen EE go offline so for it to do it when I decide to post a question for the first time in ages, I can't help feeling someone has it in for me :o)

Now I just need to suss out how to jiggle this about a bit! I'll report back once I'm done!
0
 
LVL 1

Author Comment

by:UncleVirus
ID: 35068723
quick question.. once I've applied this Pivot table to 'March' - Can I copy the formatting to another workbook easily? (I don't want to have to go through this all again on each workbook if possible).

Sorry, excel isn't my forté :-)
0
 
LVL 1

Author Comment

by:UncleVirus
ID: 35068795
Just an update, this is the end result! (Trimmed company logo and a few personal details obviously!)
0
 
LVL 1

Author Comment

by:UncleVirus
ID: 35068816
No idea why but it didn't upload the image properly... I think EE is a bit broke today!
Capture.JPG
0
 
LVL 50
ID: 35072757
Hello,

glad to see you got this sussed.

>> Can I copy the formatting to another workbook easily?

I see you have a separate sheet for each month. With this, you can create a pivot table in each sheet. Alternatively, you can have ALL data in just one sheet, and then adjust your pivot table to include the date. Pull the date into the Row Labels area, and put it above the Payment Method field. The date will be added to the pivot table. Right click any of these dates, then select Group ... and in the next dialog select Year and Month.

Now you can use the drop-downs at the top of the date column to look at just one month, or you can see an overview sorted by month.

cheers, teylyn
0
 
LVL 1

Author Comment

by:UncleVirus
ID: 35080408
Nearly there! For some reason there's also a (blank) field shown - Can I hide this?

Thanks!
0
 
LVL 50
ID: 35087219
Hello,

check the source data for the Pivot table. If you have selected more rows than you have data, you will see the (Blank). You will also see the (Blank) if a data field in the source table does not have any content.

So, make sure to include only populated rows of the data table and make sure that all your data fields have been filled in.

You can make your Pivot table data source dynamic by creating a dynamic range name and pointing the pivot source to that range name. A tutorial for that is on the Contextures website http://www.contextures.com/xlPivot01.html

cheers, teylyn

0
 
LVL 1

Author Closing Comment

by:UncleVirus
ID: 35213143
Spot on. Thanks!
0

Featured Post

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.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

610 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