I have a data set with over 120.000 lines.
In that set I want to use VBA to make a formula.
The formula multiplies 3 rows with eachtother. That outcome than gets divided by a fixed number.
So far so good formula runs fine even on that many lines.
However in that set that are some lines that get couted double in the formula.
Throwing out these lines is not an option as other columns of that line are needed.
So being smart I thought then I just let the macro count how often a certain number occurs in one of the columns.
Then I take my original formula and divide that by the outcome of the countif formula (most will be 1, and some are 2 or 3 and then the outcome of the formula is good again).
But damn what a huge difference with the original formula!
I could not even wait for it to end because 1% progress takes really minutes and my laptop is ready for take off! (and it is really not a slow laptop).
Is there a more efficient and better way then countif to identify how often a certain number in a column occurs?
ps: Manually I took out the column for the countif and ran it in a separate workbook/sheet.
That is faster but then I need to work with a vlookup again which maybe also is not desirable.
Bookmarks