Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, I have similar code that loops thru each cell and works ok but
thought there may be a quicker way to do it without looping, in one fell swoop. It will always be slower to act directly on the cells. It will be orders of magnitude faster to 'dump' the range into an array, loop the array (in memory), then 'dump' the array back into the range. Example: Sub ReplaceData() Dim vData As Variant, i As Long vData = Selection For i = LBound(vData) To UBound(vData) 'assumes 1 column selected vData(i, 1) = Replace(vData(i, 1), strOld, strNew) Next 'i Selection = vData End Sub -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replace and Substitute Functions | Excel Programming | |||
wildcards with substitute of replace | Excel Programming | |||
Replace/substitute | Excel Programming | |||
Substitute/Replace | Charts and Charting in Excel | |||
Looking for a site with functions that substitute the ATP functions | Excel Worksheet Functions |