We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

Excel formula help

Hi guys,

I do all my banking online and every few days I download the statement to excel and allocate all of my spending.....

I need some help on a formula to check what an amount is allocated to and then add it all up... i.e.

£20 - Food Shopping
£30 - Gas Bill
£40 - Car
£50 - Petrol
£60 - Food Shopping
£70 - Petrol

Obviously the money amount and the "allocation" are in seperate cells.

So then I want to put a formula in a cell to say what the total of spending on (for example) petrol for the month is.....

Can anyone assist?

Thanks
«1

Comments

  • Tigsteroonie
    Tigsteroonie Posts: 24,954
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    Forumite
    Assuming that you have the two columns, one labelled AMOUNT and the other ALLOCATION, I'd personally do this by creating a Pivot Table (it's off the Data menu), where you SUM the AMOUNT against each ALLOCATION.

    But I'm hopeless at explaining Pivot Tables, I've tried at work, plus I've just (by trying) found that the method differs slightly in later versions of Excel. Best I can suggest is that you ask the ol' paperclip for help creating a pivot table.
    :heartpuls Mrs Marleyboy :heartpuls

    MSE: many of the benefits of a helpful family, without disadvantages like having to compete for the tv remote

    :) Proud Parents to an Aut-some son :)
  • MORPH3US
    MORPH3US Posts: 4,906
    1,000 Posts Combo Breaker
    Forumite
    Cheers both,

    Yes i can do pivot tables but was hoping for a formula to do it for me....

    Can you do pivot tables beforehand that will update as you enter the data and then feed graphs.
  • So you have the various categories listed across the top row, and then add each bit of expenditure in the columns below?

    Will respond if you'd clarify!
  • Tigsteroonie
    Tigsteroonie Posts: 24,954
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    Forumite
    MORPH3US wrote: »
    Cheers both,

    Yes i can do pivot tables but was hoping for a formula to do it for me....

    Can you do pivot tables beforehand that will update as you enter the data and then feed graphs.
    You could, I guess, include loads of extra blank rows in the original data that the Pivot is based on - then you'd just have to refresh the Pivot & Chart after entering your new data into those blank lines.

    I know what you're saying, a formula would be easier. There's probably some convoluted way of selecting from an Array to match entered text.

    Is there any reason you can't do as Itsgotta... suggests, and simply have different columns for the types of expenditure? Then all you're doing is a simple SUM at the bottom of each column.
    :heartpuls Mrs Marleyboy :heartpuls

    MSE: many of the benefits of a helpful family, without disadvantages like having to compete for the tv remote

    :) Proud Parents to an Aut-some son :)
  • MORPH3US
    MORPH3US Posts: 4,906
    1,000 Posts Combo Breaker
    Forumite
    Here is an example guys:

    pic.jpg

    As you can see, the very end column is the "classification"

    I want a formula at the bottom of the sheet that fill find any cell with (for example) "petrol" in it and then take the relevent credit / debit amount and add them all up if it does find "petrol"

    Hope I have explained that ok.

    Columns A - F are the way the statement downloads from my online banking so it isn't really practical to start moving the actual figures into columns depending on the category. I just label them up manually.
  • Tigsteroonie
    Tigsteroonie Posts: 24,954
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    Forumite
    Sorry Morph3us, I don't have my Excel head on at the moment as I'm still in festive holiday mode!

    I'll check back on this thread tomorrow and see if anybody else has helped and, if not, then I'll have a play around with it whilst at work. What version Excel are you using (just in case that becomes important)?
    :heartpuls Mrs Marleyboy :heartpuls

    MSE: many of the benefits of a helpful family, without disadvantages like having to compete for the tv remote

    :) Proud Parents to an Aut-some son :)
  • Zazen999
    Zazen999 Posts: 6,183
    Part of the Furniture 1,000 Posts Name Dropper Combo Breaker
    Forumite
    You could add a filter, and in the cell that you have 'reason' change it to

    ="Reason £" &subtotal(9,g2:g2000]

    Then, the total of all of it will always show before the word 'Reason' so it would look like 'Reason £450' and if you then filter the column using the titles it will show the amount for the filtered reason as it will only subtotal the ones filtered.

    Or
    Pivot table with Reason on the Right hand side, Credits on the top and credits [sum] in the main box. Make sure you use the full columns as the data, not just the data already in. then, each time you want to update it, press the ! button and it will automatically add new rows and amounts to the data. You can place this to the side of your table, or on another worksheet so that you can see it when you want it.
  • MORPH3US
    MORPH3US Posts: 4,906
    1,000 Posts Combo Breaker
    Forumite
    Thanks very much tigsteroonie, know what you mean about the "excel head" :)

    I am using Open Office which is basically Excel 97 - 2003 although can use Excel 2007 if required.

    Thanks also zazen, first bit looks a bit complex having to type that in each time for 100+ transactions each month.

    Will give pivot tables a go for now unless someone can do any better.

    Cheers again
  • nezbit
    nezbit Posts: 14
    Part of the Furniture 10 Posts Combo Breaker
    Forumite
    Hi Morpheus

    in openoffce you can use a formula like this :-

    =SUM(IF(G1:G999="Petrol";D1:d999;0))

    type the formula into the cell where you would like the total, hold SHIFT+CTRL then press enter, this tells calc that it is an array type formula, won't work other wise.

    In this case it will look in your reason column for 'Petrol' and sum only the values found in the corresponding credit column.

    Hope this helps.
  • MORPH3US
    MORPH3US Posts: 4,906
    1,000 Posts Combo Breaker
    Forumite
    Hi Nezbit,

    YOU ARE A STAR!!!! :beer:

    Thanks very much, works a treat.

    Great work.

    EDIT

    Well it was working a minute ago, now everything is coming upas 0 (zero).... how strange
This discussion has been closed.
★ ★ ★ Meet your Ambassadors

Categories

  • All Categories
  • 356K Banking & Borrowing
  • 255K Reduce Debt & Boost Income
  • 456.3K Spending & Discounts
  • 248.5K Work, Benefits & Business
  • 606.4K Mortgages, Homes & Bills
  • 179.1K Life & Family
  • 264.1K Travel & Transport
  • 1.6M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.7K Read-Only Boards
Quick Search

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.