VBA Code Help needed!

Javi

Active Member
Joined
May 26, 2011
Messages
440
I have a worksheet that contains 90K plus rows.
Column B represents part numbers
Column K represents usage (usage can range from 0 to 5000 for any part)

The part number will appear multiple times based on different locations with different usage.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
I need to know what parts had 0 at all storage locations.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I would Like to put an indicator and column O if the above criteria of no (0) usage in any store location is met. It can be a numeric number or a statement anything that would allow me to sort by.
 
Upvote 0
I'm no formula expert, but I think you would need something like SUMIF. Then you can create a formula that sums all usages for all lines that have equal partnumbers. That formula has the partnumber as a parameter and returns the sum of usages. Then you can sort on that sum and select the ones where it is 0.
For a range of 90K rows, I'm afraid for the performance though, since this formula will need to be calculated 90K times as well...
I guess it would be wise to let it calculate everything once, then convert the results to values and remove the formulas.
 
Last edited:
Upvote 0
Hi Javi, Does a pivot table solves your problem? You can pivot by dragging into the Row: "Part Number", dragging into the Data: "Usage" (Note make sure that the usage is sum not count)?
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,683
Members
452,938
Latest member
babeneker

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