|
|
#1 |
|
Hyperactive Member
Join Date: Mar 07
Location: Colorado
Posts: 258
![]() |
Converting an entire sheet to Metric and back
Hi all,
I would like to convert an entire Excel sheet, or at least most of it, to metric units (multiplying by 1.12 for this particular unit). The entire range I wish to convert can be anywhere from 8 cols x 30 rows to 8 cols x 10k rows. What would be the most efficient way to solve this problem? Just a huge loop over the range of the cells I wish to convert, multiplying (or dividing if going back to English) each cell value by 1.12? Or is there a more efficient approach? Thanks Much |
|
|
|
|
|
#2 |
|
Fanatic Member
Join Date: Dec 04
Location: Sector 000
Posts: 556
![]() |
Re: Converting an entire sheet to Metric and back
Looping through individual cells in a range can be slow. It is better to read the range directly into an array, modify the array, and write it back out:
vb Code:
__________________
VBAhack (Links: Cubic Spline Tutorial, Parametric Cubic Spline Tutorial, VB Numerical Routines)
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|