We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Spreadsheet help

Options
shopbot
shopbot Posts: 1,022 Forumite
Part of the Furniture 500 Posts Combo Breaker
Please can I have some spreadsheet help?

I've created a spreadsheet that I download my monthly credit card transactions into. I'm using Google Docs.

I want to be able to group certain transactions together so I can track my spending against my budget.

I have been using the SUMIF command to do this. This works when the transaction always has the same title eg 'Asda'

However some retailers will show as 'Tesco Store 123, Tesco Store 234' etc

Is there way to make the SUMIF command incorporate an instruction similar to 'If this cell contains the word Tesco' then group together.

Thanks
SB

Comments

  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    You would probably need what's called a "helper" column.
    You can translate the (in this case) "Tesco Store 123" into just "Tesco" using either vlookup or index/match (you'd need the full names somewhere else).
    You can then use SUMIF against the helper column and carry on as normal.
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
  • Stompa
    Stompa Posts: 8,375 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    You can use wildcards, so where you would previously have used:

    =SUMIF(A1 : A5,"Tesco Store 123",B1:B5)

    instead use:

    =SUMIF(A1 : A5,"*Tesco*",B1:B5)

    (though without the spurious spaces around the colons).
    Stompa
  • shopbot
    shopbot Posts: 1,022 Forumite
    Part of the Furniture 500 Posts Combo Breaker
    Thanks rmg1 and stompa.

    Stompa's solution looks to work best for me at the moment as I may not always be shopping in the same set of locations.

    Please can I ask a follow up question?

    I've set up a single wildcard successfully - how can I change that to 'All Entries that contain Tesco, Asda or Sainsbury' etc?
  • Stompa
    Stompa Posts: 8,375 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    edited 19 March 2013 at 4:47PM
    shopbot wrote: »
    I've set up a single wildcard successfully - how can I change that to 'All Entries that contain Tesco, Asda or Sainsbury' etc?
    It's probably not the best solution, but I guess you could simply add them together, so:

    =SUMIF(A1 : A5,"*Tesco*",B1:B5)+SUMIF(A1 : A5,"*Asda*",B1:B5)+SUMIF(A1 : A5,"*Sainsbury*",B1:B5)

    (though that does assume that you never have an entry that contains both Tesco & Asda say).
    Stompa
  • stevemcol
    stevemcol Posts: 1,666 Forumite
    =SUM(SUMIF(A1 : A5,{"*asda*","*tesco*","*sainsbury*"},B1 : B5))
    Apparently I'm 10 years old on MSE. Happy birthday to me...etc
  • shopbot
    shopbot Posts: 1,022 Forumite
    Part of the Furniture 500 Posts Combo Breaker
    Thanks stevemcol and Stompa. Have got those working.

    SB
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.9K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.9K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

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.