Hi guys,
I've made a simulation model in Excel with the help of many of you (so thank you all), but the model is very slow. The main reason is the use of the =rand() formula that ranks events in ascending order. This calculation must be made after each event and takes a long time to complete. This because of the length of the list that it must rank which can be up to 20,000 rows. This formula becomes exponentially slower based on the length of the list. I'm wondering whether replacing it with a macro would speed up operations.
Imagine a list of dates in the range B2:B20000. Would it be possible to develop a macro that would rank these dates in range A2:A20000? For example, B4500 has the date 01-01-15 and is the lowest value in the list. A4500 would therefore receive the rank of '1', while B30 has the value 12-31-15 and is the highest value on the list and receives a ranking of '19999' in cell A30.
- Would it be possible to write a macro for this computation?
- Would it be quicker then the =rank() formula?
Best wishes,
Ronnet
Bookmarks