Is it possible to use something like this example for find replace
except just for single sheet with a huge data set, say 300,000 -
600,000 cells?
The built in find replace is quite slow.
This looks like it loads the sheet (actually a file) into a
Variable and does the find replace on the variable... is that
correct?
Yes, that's correct! Doesn't address your data being in a worksheet
unless you export the sheet to a delimited file first, then import it
back after replacing the string.
I recall posting code to efficiently 'dump' a sheet into a
tab-delimited file and vice versa. You'll have to search topics (in a
few groups here that you frequent) for something containing
"importing from a text file" Basically, you can...
call the export procedure;
call 'ReadTextFile' to dump the data into a string var;
replace text;
call 'WriteTextFile' to dump the string back into the file;
then call the import procedure
..to 'dump' the file back into the sheet.
Might seem a bit convoluted but all the procs are reusable. There are
addition procs to convert 2D array to 1D and vice versa. All is very
fast compared to working directly in the sheet!
There's more recent code to dump a sheet into a file here in this forum
posted Sep 29th...
"Save Excel VBA as tab delimited text file without quotes"
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion