# Run formula on different sheet

I need help applying this formula to a different sheet:

``````=SUMIF(A2:A6,"3",H2:H6)
``````

I'm basically trying to discover expenses for the month of March, and hopefully having a year constraint in there too. This is how it looks like:

The expense report is separate from the summary report.

• Perhaps you could share a spreadsheet with us, that demonstrates the problem? Apr 4 '14 at 10:37
• See my revised answer. Apr 5 '14 at 12:02

If you're in the summary report sheet and you want to sum something in the expense report sheet, then you need to do the following:

``````SUMIF(expenses!A2:A6, "3", expenses!H2:H6)
``````

If your sheet name is Expense Sheet, then you need to write the formula like so:

``````SUMIF('Expense Sheet'!A2:A6, "3", 'Expense Sheet'!A2:A6)
``````

If you want to search for values only, then I would re-write the `"3"` into `3`.

• Thank you for the reply, I'm still having trouble. I've attached a spreadsheet screenshot to show my spreadsheet and formula to try and help. screencast.com/t/4BwyqSJS4o Apr 4 '14 at 22:23
• Thank you for your help. This worked. Also from your answer I was able to discover SUMIFS and setup the 2014 conditional: =SUMIFS( 'Expense Report'!H:H , 'Expense Report'!A:A, "3", 'Expense Report'!C:C, "2014" ) Apr 5 '14 at 20:42

For future reference (as you already have an answer,) you can use FILTER to get you specific rows based on a few conditions.

``````=SUM(FILTER(H:H, A:A=2013, B:B="March"))
``````

This would filter out your H column (which I assume are your expenses) for rows that are in the year 2013 and have March as the month indicated in Column B, and then add the numbers together.

You can also use FILTER across sheets to provide multiple values for SUM!