Change a sumif formula to be more dynamic

CaptainGravyBum

Board Regular
Joined
Dec 1, 2023
Messages
76
Office Version
  1. 365
Platform
  1. Windows
Hello,
I have a formula that is working very well, but it has a unique row number specified. If I try to drag it past the set number of rows the formula errors.
How can I make it more dynamic?, sorry for just pasting the formula, but hopefully you can get anything you need from it without the worksheet as well.
I did try changing the $B$3:$B$25 type ranges to be B:B, but that doesn't work.

=IF(COUNTIFS($B$3:$B$25,B4,$D$3:$D$25,D4)=COUNTIFS($B$3:$B4,B4,$D$3:$D4,D4), SUMPRODUCT(($B$3:$B$25=$B4)*($D$3:$D$25=$D4)*($R$3:$R$25)),"")
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Maybe
Excel Formula:
=IF(COUNTIFS(B:B,B4,D:D,D4)=COUNTIFS($B$3:$B4,B4,$D$3:$D4,D4), SUMIFS(R:R,B:B,B4,D:D,D4),"")
 
Upvote 2
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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