+ Reply to Thread
Results 1 to 5 of 5

Adding values based on both month and text criteria

  1. #1
    Forum Contributor
    Join Date
    12-30-2008
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    197

    Adding values based on both month and text criteria

    Hi,

    I'm trying to create a savings spreadsheet. I have downloaded 6 months worth of data from my online banking and have put them in separate tabs.

    I have entered a category in the first column of every tab. This is to break out what the transaction/withdrawal was for i.e. rent, food, social..and so on.

    I have attempted a formula in 'sheet1' but its still fairly manual. Please can some one write a formula that adds the different values for each catagory, depending on date and text.

    Please see the attached. It should be fairly self explanatory.

    Thanks in advance

    Sam
    Attached Files Attached Files
    Last edited by 3smees23; 09-02-2011 at 09:12 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Adding values based on both month and text criteria

    Hi,

    How about a pivot table like in the attached. All you'd need to do would be to add each month's data onto the Combined sheet and then refresh the range the pivot table looked at which could be done automatically with a little bit of vba code.

    Dom
    Attached Files Attached Files
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Adding values based on both month and text criteria

    Hello,

    If you make sure that the sheet names are EXACTLY the same as the text in row 2, then you can use a formula like this in cell J3 and copy it down and across:

    =SUMIF(INDIRECT(J$2&"!A2:A100"),$I3,INDIRECT(J$2&"!E2:E100"))

    But you will have to fix the inconsistent naming first. For example, the sheet is called "Aug " with a trailing space, the value in the cell is just "Aug" in your file. I've fixed that in the attached example. You will still need to fix the Apr vs. April and Mar vs. March.

    The #Ref! values in the attached file mean that the sheet "Apr" or "Mar" cannot be found. Rename the sheets from "April" to "Apr" and from "March" to "Mar" and the results will show fine.

    In Excel, little details like consistent spelling DO matter.

    cheers,
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Adding values based on both month and text criteria

    Hi,

    See the attached

    A better approach is to use a single sheet to hold all your records. i.e. the Data sheet in the attached.

    There are some categories missing from the original data summary and I've added some. However others are still missing so you'll need to go through and ensure they are listed.

    There are also rows in the original monthly sheets (and since I've just copied them the Data sheet), where there are obviously debits or credits missing where the Running balance changes. e.g. February E13.

    You'll need to correct these too.

    Regards
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Contributor
    Join Date
    12-30-2008
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    197

    Re: Adding values based on both month and text criteria

    Thank you all for your help!!

    Have a good weekend

    Sam

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1