SumIF from another sheet
Hi,
I have a formula that sums up the expenses for a particular billing code, like this:
=SUMIF([Account Code]:[Account Code], "539023", [Expenses Submitted]:[Expenses Submitted])
This works well, however, I want to use this code on a different sheet, without having to link to a bunch of cells on the first sheet. I can't seem to get the sheet references to work (I don't want to put in a range, I want it to sum everything with that account code, as lines are added to the sheet from a form).
Thanks.
Answers
-
Hi @Barent Wagar
Hope you are fine, Please add a copy of your sheet or a screenshot (after removing or replacing any sensitive information). This will make it easier for me to provide the appropriate answer to your question.
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
-
Thanks, I hid a bunch of columns, basically I want to replicate what I did on the second sheet but with a reference, not a link to a cell.
Thanks.
-
We can replicate your exact same formula but change it to be a cross-sheet formula instead of an in-sheet one. The way to do this is to simply swap out your current column references that look like this:
[Account Code]:[Account Code]
to be a cross-sheet range that looks down that one specific column:
{Account Code in Source Sheet}
Since your current sheet has a column for the Account Code, you can replace the number "in these" with a cell reference to your current sheet's column, like so:
"539023" becomes [Account Code]@row
The final formula should look something like this:
=SUMIF({Account Code in Source Sheet}, [Account Code]@row, {Expenses Submitted in Source Sheet})
This will only SUM together data in the Expenses Submitted Column for the rows that match the Account Code you place in the cell in that row.
Here are some Help Center articles that may help as you build this out:
- Formulas: Reference Data from Other Sheets
- Create a Cell or Column Reference in a Formula
- SUMIF Function
Let me know if this works for you or if I can clarify anything further!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Awesome, thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!