Optimising SUMIFS question

JumboCactuar

Well-known Member
Joined
Nov 16, 2016
Messages
788
Office Version
  1. 365
Platform
  1. Windows
Hi
My original formula in column H
Code:
=SUMIFS($B$2:$B$10000,$A$2:$A$10000,G2,$C$2:$C$10000,H$1)

I got it faster by editing as below:
Code:
=IF(G2=0,0,SUMIFS($B$2:$B$10000,$A$2:$A$10000,G2,$C$2:$C$10000,H$1))

Wondering if adding a COUNTIF check would make any difference?

Like
Code:
=IF(COUNTIFS($A$2:$A$10000,G2,$C$2:$C$10000,H$1)=0,0

Before the Sumifs check
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
example layout:
cf8e18735e.png


i know a pivot table would be best for this but in this situation i cant use them
 
Last edited:
Upvote 0
Here is a proposal...

1. Define Lrow via Formulas | Name Manager as referring to:

=MATCH(9.99999999999999E+307,Sheet1!$B:$B)

2. Define also Names as referring to:

=Sheet1!$A$2:INDEX(Sheet1!$A:$A,Lrow)

3. Define Values as referring to:

=Sheet1!$B$2:INDEX(Sheet1!$B:$B,Lrow)

4. Define Color as referring to:

=Sheet1!$C$2:INDEX(Sheet1!$C:$C,Lrow)

Now you can invoke...

Either:

=SUMIFS(Values,Names,G2,Color,H$1)

This should be fast...

Or:

=IF(ISNUMBER(MATCH(G2,Names,0))*ISNUMBER(MATCH(H$1,Color,0)),
SUMIFS(Values,Names,G2,Color,H$1),0)

if that necessary.
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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