To increase performance I would like to optimize the following macro. Probably passing from a for cicle to a search.
Any suggestion?
![]()
Please Login or Register to view this content.
To increase performance I would like to optimize the following macro. Probably passing from a for cicle to a search.
Any suggestion?
![]()
Please Login or Register to view this content.
Try:
![]()
Please Login or Register to view this content.
Last edited by Olly; 07-21-2014 at 04:49 AM.
let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source
If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE
Walking the tightrope between genius and eejit...
I am not sure the for loop is your biggest problem. Is there a reason you are pulling in 322,000 rows for each array every time. Is there a set number of entries? If there is usually less than that you can just pull in what is needed and run through that (since you only run through 234,100 for the bigger array anyway).
You can also move certain things around to require less calculations such as moving the MyVar = DataRange(Irow,1) before the second for loop starts. This will take out (234,100 x 321,999) calculations that the macro has to run.
I like Olly's solution. Nice and simple. No pulling data into arrays.
Last edited by Hawkeye16; 07-21-2014 at 04:53 AM.
Despite the high cost of living, it remains very popular.
Don't forget to mark threads SOLVED when you get an answer and rep all the geniouses that helped you today!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks