Well I have looked at your code, and found that you have an infinite loop in your first do-loop, if you examine closely you will see that the ActiveCell.column is constantly advancing while the n+2 is not.
In any case here is my take on what you are trying to achieve, it will advance to the next row and so on and forth until it finds an empty ActiveCell in the GeneralRank Worksheet.
As you can see I have modified the conditions, and the way they advance somewhat, I believe without further details that this is what you are looking for.
In any case this should be enough to get some dirt under your feet and help you find the solution. If not then you need to provide further details, exact algorithm of what you intend to do and if possible how you define the values used in this function as well as some initial test values as well as expected values.
Regards,
Jaime Diaz
---------------------------------------------------------------------------------------
If you found this answer usefull please press the star below
Bookmarks