Change SUMIF and CHANGIF formulas so that filtered data only gets calculated.

bored622

New Member
Joined
Mar 2, 2022
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
Hello, I currently have these formulas that calculate data from another tab's table, but if I filter data out of the table, my formulas still calculate the filtered out data. I'm pretty new to excel, but I've read a few forums on using SUMPRODUCT to get the results I want but not sure how to do it. Below I have posted a few formulas. If anyone can help, it would be greatly appreciated.

=COUNTIF(USSW1!$V$7:$V$25000,465)

=SUMIF(USSW1!$V$7:$V$25000,"465",USSW1!$O$7:$O$25000)-SUMIFS(USSW1!$O$7:$O$25000,USSW1!$M$7:$M$25000,"FP",USSW1!$V$7:$V$25000,"465")

=COUNTIFS(USSW1!$V$7:$V$25000,"465",USSW1!$M$7:$M$25000,"FP")

=SUMIF(USSW1!$V$7:$V$25000,"465",USSW1!$O$7:$O$25000)-SUMIFS(USSW1!$O$7:$O$25000,USSW1!$M$7:$M$25000,"CA",USSW1!$V$7:$V$25000,"465")-SUMIFS(USSW1!$O$7:$O$25000,USSW1!$M$7:$M$25000,"CF",USSW1!$V$7:$V$25000,"465")

=SUMIF(USSW1!$V$7:$V$25000,"465",USSW1!$O$7:$O$25000)
 

bored622

New Member
Joined
Mar 2, 2022
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
You will need to change the SUMIF to SUMIFS as SUMIF does not allow more than one criteria.
I changed my formula and got it to work.
I went from:
=SUMIF(USSW1!$V$7:$V$25000,"465",USSW1!$O$7:$O$25000)-SUMIFS(USSW1!$O$7:$O$25000,USSW1!$M$7:$M$25000,"FP",USSW1!$V$7:$V$25000,"465")-SUMIFS(USSW1!$O$7:$O$25000,USSW1!$M$7:$M$25000,"BK",USSW1!$V$7:$V$25000,"465")
to
=SUM(SUMIFS(USSW1!O7:O50000,USSW1!M7:M50000,{"CA","CF"},USSW1!V7:V50000,{"465"},USSW1!W7:W50000,1))
and now it filters out the data I wanted. Thank you
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,852
Office Version
  1. 365
Platform
  1. Windows
Glad you sorted it & thanks for the feedback.
 

Forum statistics

Threads
1,176,507
Messages
5,903,450
Members
435,030
Latest member
zechariah

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
Top