Yarsk wrote:And I found that changing ".DataArray" by ".Data" also works. What are those extensions ?

I think I'm on a good way to let my macro run faster.

.Data may be used if your data are strictly numeric, as in this case. DataArray is good for both doubles and strings. There is also FormulaArray, which handles strings much the way .Data does numbers, though it also has other uses, with formulas

, and it may be used in conjunction with DataArray to convert formulas to their values without the need of doing clipboard Copy and Paste Special.

So if oRange contains any combination of cells with formulas returning either text or numbers, the formulas can be converted to their results with

- Code: Select all Expand viewCollapse view
`oRange.setFormulaArray(oRange.DataArray)`

and that will also leave any constant values undisturbed.