Sorry I was not clear, I have been trying to explain this to my boss all day but my lack of the English language is letting me down.
I use variants to load a range of values from a sheet in one go without "redim preserve". I load the whole sheet into memory then do 100 and 1 things with it 1.2 seconds rather than reading and writing cells 30 -60 seconds.
The sheet contains columns with times, dates, distances, and other customer category data. Say 1000000 rows with 26 columns. 20 of which are used. the 6 columns at the end are in the array as blank, I then set them to true or false.
Say I use a work book function on the time likes =CountIfs(Times,">="&0500,Times,"<"&0700).
That row will always be in that time bracket, so its true or false. so then I just need to say =Countifs(timeHelper,true). It is so fast. I just want to know is it better to have Typed true false in the cell, true false with an = or 0 - 1.
i.e.
you put it back in the work book by
loads the range in one go, you have to use variant for arrays for this method or you get errors.
otherwise its load every cell one by one and that takes time. like
I'm just looking for the fastest option for the final workbook function with countifs, sumifs and averageifs. I use in cell formulas at the moment but I don't want the book clogged up formulas for static helper columns.
I will however use your vba to speed up the data import. looks very good.
Bookmarks