Transfering a Worksheet Range into an Array and back to the sheet in Excel VBA- Code included

preview_player
Показать описание
Grab the Free VBA Quick Reference Guide
This video shows how to easily copy or transfer data from a worksheet range into a VBA array and how to transfer or past it back on the sheet.

When working with large data sets this is the preferred method because it is a lot faster. All the calculations and work is done in memory instead of doing it on the screen.

Code

Sub Range_to_Array()
Range("A1:i1").Select
oarray = Range("A1:i1")

oarray(1, 1) = "New MPG"
oarray(1, 9) = "Car"

Range("A1:i1") = oarray

End Sub
Рекомендации по теме
Комментарии
Автор

Thanks for your videos Chris!!! Much appreciated!!!!

wallacefreedom
Автор

Perfect! Just the simple solution that I was looking for.

donalmurphy
visit shbcf.ru