Calculate total sales tax per county across different rows and columns

davilillo

New Member
Joined
Jan 9, 2019
Messages
14
I have a spreadsheet with sales tax collection data for 2018's Q4. It includes which county specifically each order's sales tax was collected for. See below:



I need to calculate the total sales tax collected per county in orders shipped to California in column M. To accomplish that, I’d need a formula that:

1. Searches for the name of the corresponding county in column L on column G, in the same row where "County" appears on column F
2. When it finds the county name, verifies that text "CA" appears two rows above, next to "State" (to prevent duplicates with other states)
3. Adds up all the "Total_Tax" values next to CA for that county

Thanks a lot in advance!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Maybe this...

=SUMIFS(H$2:H$1000,F$2:F$1000,"State",G$2:G$1000,"CA",F$4:F$1002,"County",G$4:G$1002,L2)

M.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top