Results 1 to 7 of 7

SUMIFS Formula not giving desired result

Threaded View

  1. #1
    Registered User
    Join Date
    10-12-2013
    Location
    Perth, Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    3

    Cool SUMIFS Formula not giving desired result

    Hi,

    I am a using Excel 2013 and I am having trouble understanding why a formula I am working with isn't working.

    The problem: So I am creating an Excel Worksheet that gets income and expense data from a MySQL database, imports it into tables and then formulas determine expenses and income for a given year. I have linked up MySQL and that's all working fine but my problem is with the expenses calculation.

    The formula requires data from two sheets:
    • Annual Expenses 2013: contains the calculations based on the Expenses sheet. It creates a table based on the categories made ([Expense Name]) in the MySQL database and then calculates from the Expenses sheet what expenses were made (expenses_totalsum) in that category given they were made in the a year specified in a cell (annual_expense_year).
    • Expenses: contains the data imported from the MySQL database. The fields I am working with in this sheet are the category the expense is filed in (expenses_category_name) and the year the expense was made (expense_year).

    So the formula I used in the first place was: =SUMIF(expenses_category_name,[Expense Name],expenses_totalsum). This would search through the category name in the Expenses sheet, match it with the Expense Name in the Annual Expenses 2013 sheet and return the SUM of said values that matched those criteria from the expenses_totalsum column in the Expenses sheet.

    This all worked fine but now I need to introduce the year factor. So I need to achieve the same thing except any value it finds must also search the Expenses sheet for the year the expense was made and match it to the year set in the Annual Expenses 2013 Sheet.

    This is the formula I have tried amongst other things but I can see where I have gone wrong: =SUMIFS(expenses_totalsum,expenses_category_name,[Expense Name],expenses_year,annual_expense_year) this just returns a value of 0.
    Just a little extra info: the annual_expense_year value is a cell with the year in it within the Annual Expenses 2013 sheet. The expense_year is a column of data within the Expenses sheet (each expense is assigned a date and this column just displays the year of that date).

    I can upload the worksheet if anyone want's it I just don't know if the data will also move with the sheet given the MySQL is on a localhost (for now).

    Thanks for any help and I hope I have explain it well. I tried my best but it's a little complex.
    Last edited by lukemelville; 10-12-2013 at 07:58 AM. Reason: Added attachment

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula giving different result on two different pcs
    By mdooley in forum Excel General
    Replies: 2
    Last Post: 05-28-2012, 07:05 PM
  2. macro not giving desired output
    By coolanks1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-23-2009, 07:36 AM
  3. Struggling With How to Create A Formula for Desired Result...
    By oxyron in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-01-2007, 03:36 PM
  4. Sumif formula not giving result
    By abanerji in forum Excel General
    Replies: 5
    Last Post: 06-13-2006, 02:25 PM
  5. [SOLVED] Formula not giving me the right result
    By Steved in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-09-2006, 10:25 PM

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