More Efficient Way to Count First Instance

sbpersson

New Member
Joined
May 8, 2018
Messages
8
Good afternoon all,

I'm sorry if this has been answered already, but I am in desperate need of a more efficient way to count first occurrences in a workbook I frequently use. I am currently using the following:

=IF(MATCH($J2,$J$2:$J2,0)+1=ROW($J2),1,0)

Once this calculation is made for all the data entries, I use the following on a summary sheet to return the right quantity.

=COUNTIFS($J$2:$J:$1000000),1$J$R:$R:$1000000,"Non RTV",$Q$2:$Q:$1000000,"PAIR",$C$2:$C:$1000000,101,$O$2:$O:$1000000,"Cross Dock")

Since this workbook is typically between 40K and 60K rows, it takes up a tremendous amount of memory performing these calculations. I'm also working on automating this component of my process through VBA, but the amount of calculations often causes my excel to crash.

Any help will be greatly appreciated. Thanks!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,224,823
Messages
6,181,169
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