Forum Discussion
johnsboxftm
Mar 13, 2023Brass Contributor
Which feature should I use for a sum of taxes collected for each city by name?
Hi all,
Your help is always appreciated, greatly. I would like to add the sum of taxes collected for each city on a spreadsheet ... I have no idea of how to go about that. Here is a pic of my current spreadsheet:
What I want to do is get a sum for all the taxes collected for each city
Like this, perhaps?
I'm not sure how to write the formula. Please help. And thank you in advance.
- SammyFaveCopper Contributor
If you're looking to sum taxes collected for each city by name, try using the SUMIF function in Excel. This function allows you to specify a range of cells to sum based on certain criteria, like the city name. However, if you're having trouble getting the data you need, consider using PayStubCreator. This website can help you generate accurate pay stubs that include information on taxes collected, making it easier to track your earnings and expenses.
In B30:
=SUMIF($B$2:$B$26, A30, $G$2:$G$26)
Fill down.
Alternatively, create a pivot table based on the data, and add the City field to the Rows area and the Tax field to the Values area.
- johnsboxftmBrass ContributorI do have a table created with all the cities I have tax rates for ... I was hoping to have the formula automatically pull from that table's list of cities, then look at which of those cities I have on this particular sheet and then give me a grand total of $ in taxes
A pivot table based on the data range in your first screenshot will automatically list only the cities that are present in that range.