wSumifs/Index/Match

chethead

New Member
Joined
Jul 23, 2015
Messages
45
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I’m trying to write a formula that accomplishes the following:

Sum any quantity in named range EstQuantity that matches items in named range Raceway based on named range EstDescription and meets the criteria I set forth in EstSortCode

Raceway
is a defined set of data – around 350 rows. This will never change.
Estxxx will change with every estimate I create. Named ranges were created for every column on the Estimate tab. I want to compare items in the EstDescription that match the items in Raceway and sum the quantity (EstQuantity)

Book1
ABCD
1Sort CodeDescriptionQuantityTotal Hours
21000 3/4" CONDUIT - EMT137810
32000 3/4" CONDUIT - EMT137810
41000 1/2" CONN SS STL - EMT922
51000 3/4" CONN SS STL - EMT942
61000 1/2" COUPLING SS STL - EMT902
710001 1/2" CONDUIT - EMT200.5
81000 3/4" COUPLING SS STL - EMT1262.25
Sheet1


In the above table, I want to add the quantity of row 2 and row 7 because they meet the correct sort code and description. Row 3 meets all criteria except sort code, so I don't want that summed. Rows 4, 5, 6 and 8 description does not match anything in the named range Raceway, found on another sheet.

For total hours, I used this formula and it seems to be working great =SUM(SUMIFS(EstTotalHours,,EstSortCode,{1000,4000,5000,8000})). So now I am looking to pick out specific pieces of this formula based on EstDescription matching Raceway and summing corresponding quantity.

Thank you,
Rob
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Not seeing how Estxxx relates to the rest of the detail in your post, is that referring to the sort codes?

Try this, array confirmed with Ctrl Shift Enter.

=SUM(SUMIFS(EstQuantity,EstSortCode,{1000,4000,5000,8000},EstDescription,Raceway))
 
Upvote 0
Thank you Jason.

The only thing I was trying to imply is that any named ranged starting with Est will change every time I use the spreadsheet - maybe just too much info.

It seems like your solution works. I went through 2,000+ lines and tried highlighting all quantities that meet the criteria. I was off a little but I may have missed some. I will work with it a bit.

One other question - I want to subtract out certain items so I will use your formula and then subtract using a tweaked version of that formula. do I use shift-ctrl-enter at the end of the formula or do i put in curly brackets each for each portion of the formula?

{=SUM(SUMIFS(EstQuantity,EstSortCode,{1000,4000,5000,8000},EstDescription,Raceway))-SUM(SUMIFS(EstQuantity,EstSystem," || 0300 - LOW VOLTAGE DISTRIBUTION EQUIPMENT",{1000,4000,5000,8000},EstDescription,Raceway))}

or

{=SUM(SUMIFS(EstQuantity,EstSortCode,{1000,4000,5000,8000},EstDescription,Raceway))}-{SUM(SUMIFS(EstQuantity,EstSystem," || 0300 - LOW VOLTAGE DISTRIBUTION EQUIPMENT",{1000,4000,5000,8000},EstDescription,Raceway))}

Thank you for your help
 
Upvote 0
do I use shift-ctrl-enter at the end of the formula or do i put in curly brackets each for each portion of the formula?
Just use CSE for the whole formula as with your first example above, if you type the the brackets then it will not work.

As you're increasing the complexity, one thing that I will add - you can only use arrays for 2 criteria in a single countifs function, 1 must be horizontal and the other vertical. With what you are currently using it works perfectly, the array constant is the horizontal array and the Raceway range is the vertical. If both of the arrays were in ranges then you would need to wrap one of them in the TRANSPOSE function.
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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