Hi,
The first loop process, to fill blank cells can be entirely eliminated with this code which instantly fills the blank cells, if they exist.
The main body that uses the COUNTIFS functions to compare cells and count results...is the *killer* here. You are dealing with an outer loop of 800 cycles, and each cycle has an inner loop of 3000 odd cycles! That is 2.5 million loops and this is doubled with a second similar loop to compare two other columns. Just less than 5 million loops... No wonder the run time is so much!
I cannot figure out what you are doing with the comparing of the columns? Could you provide a formula on the spreadsheet that does what you need. IOW: can you create the formula that the code is using on the spreadsheet that provides the calculating you need. If I can get this formula from you, we can formulate a range and simply input the formula into the range instead of looping a formula one at a time into each cell.
TX
Bookmarks