Workbook design question on large datasets and formulas

Mr_Phil

Board Regular
Joined
May 28, 2018
Messages
150
Office Version
  1. 365
Hello. I am designing a work book that will compare a set minimum, maximum, usage, and on hand amount for parts and techs. The min and max tabs will have about 250 columns of part names and about 150 rows of technicians names. Where they intersect will be a static number to make the minimum and maximum. Each tab will be identical except for the static number at the intersections. I will get a usage download showing the date an item was used, the work order, the tech name, and the item name. I will also get an on hand download showing item, quantity, and tech download. The issue tab will be identical to the min and max tabs except that the intersection will be a formula that looks up
  • the minimum (its currently a two part xlookup on the min tab)
  • the maximum (same as the min just a different tab name)
  • Usage via a sumifs based on tech name, part, and a date range
  • On hand via countifs based on part name and tech name
The logic of the formula is
Excel Formula:
=IF(USED+ON HAN<MINIMUM,MINIMUM-ON HAND,IF(USED+ON HAND>=MAXIMUM,MAXIMUM-ON HAND,USED))

The actual formula following the above logic works but it is a mouthful.
Excel Formula:
=IF(COUNTIFS(USED!$M:$M,$A2,USED!$F:$F,D$1)+COUNTIFS('OH FIELD'!$I:$I,$A2,'OH FIELD'!$A:$A,D$1)<XLOOKUP($A2,MIN!$B$1:$DO$1,XLOOKUP(D$1,MIN!$A$4:$A$186,MIN!$B$4:$DO$186,0)),XLOOKUP($A2,MIN!$B$1:$DO$1,XLOOKUP(D$1,MIN!$A$4:$A$186,MIN!$B$4:$DO$186,0))-COUNTIFS('OH FIELD'!$I:$I,$A2,'OH FIELD'!$A:$A,D$1),IF(COUNTIFS(USED!$M:$M,$A2,USED!$F:$F,D$1)+COUNTIFS('OH FIELD'!$I:$I,$A2,'OH FIELD'!$A:$A,D$1)>=XLOOKUP($A2,MAX!$B$1:$DO$1,XLOOKUP(D$1,MAX!$A$4:$A$186,MAX!$B$4:$DO$186,0)),XLOOKUP($A2,MAX!$B$1:$DO$1,XLOOKUP(D$1,MAX!$A$4:$A$186,MAX!$B$4:$DO$186,0))-COUNTIFS('OH FIELD'!$I:$I,$A2,'OH FIELD'!$A:$A,D$1),COUNTIFS(USED!$M:$M,$A2,USED!$F:$F,D$1)))

That big formula works but it takes some time since on a busy day it will be in 37500 cells. The reason it is that way is so I can see at a glance which parts and which techs are going to be heavy that day. A power query script unpivots the Issue table. That query is pivot tabled in tabular form showing the tech at the top and the items, scan codes, quantity to issue below. Then I break out the page report filter by name option, select all the pivots, print to pdf and mail out to the picker crew.

It works and I have learned a lot but I am wanting to see if there are other techniques I can learn that might be more efficient. I can already see the absolute references will cause issues when adding or deleting techs and parts across three tabs. So I don't expect someone to solve my issue. I'm more looking for pointers and references so I can work the issue.

Thank you very much for reading and for any advice you'd care to offer.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Can you provide a link to a shortened non sensitive info version of the workbook for us to test with?
 
Upvote 0
Can you provide a link to a shortened non sensitive info version of the workbook for us to test with?
I tried. But when I changed the names, parts, etc to something generic it broke the power query as it couldn't find the attributes. I am still learning PQ so I have to figure out a workaround. Once I can then I will be happy to upload a sample workbook.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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