Solved

Office / Excel 2010 Formula Query

Posted on 2011-03-08
14
320 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
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

Expert Comment

by:Ingeborg Hawighorst
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst earned 500 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

Expert Comment

by:Ingeborg Hawighorst
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

Expert Comment

by:Ingeborg Hawighorst
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

Expert Comment

by:Ingeborg Hawighorst
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

815 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

12 Experts available now in Live!

Get 1:1 Help Now