Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #109510

Re: Huge data set Find-Replace

From GS <gs@v.invalid>
Newsgroups microsoft.public.excel.programming
Subject Re: Huge data set Find-Replace
Date 2016-11-01 19:12 -0400
Organization A noiseless patient Spider
Message-ID <nvb7gn$1gs$1@dont-email.me> (permalink)
References <f6c9c577-4b23-4293-899c-32ff28c522f5@googlegroups.com> <nv956p$297$1@dont-email.me> <nv95ip$342$1@dont-email.me> <48812e8f-ca61-4673-af94-b488eb15c40c@googlegroups.com> <nvaprp$be3$1@dont-email.me>

Show all headers | View raw


The code snippets are more than you need for this task, but you should 
be able to create a reusable VB_Replace(sFind$, sReplace$) procedure 
from it by revising the code samples to...

  1 load the sheet data into a string var
      vData = ActiveSheet.UsedRange
      Join() each row of data with vbTab into a tmp array
      Join() the tmp array into a string with vbCrLf

  2 Replace(MyStr, sFind, sReplace) '//all occurances in 1 shot

  3 load the string back into the worksheet
      Split the string into a tmp array with vbCrLf
      Split each element with vbTab so you have an array of arrays
      dump the data back into the worksheet via 1 of the methods shown

..so that you accomplish everything exampled except the file 
write/read!

-- 
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
  comp.lang.basic.visual.misc
  microsoft.public.vb.general.discussion

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Huge data set Find-Replace "L. Howard" <lhkittle@comcast.net> - 2016-10-31 19:17 -0700
  Re: Huge data set Find-Replace GS <gs@v.invalid> - 2016-11-01 00:21 -0400
    Re: Huge data set Find-Replace GS <gs@v.invalid> - 2016-11-01 00:27 -0400
      Re: Huge data set Find-Replace "L. Howard" <lhkittle@comcast.net> - 2016-11-01 01:11 -0700
        Re: Huge data set Find-Replace GS <gs@v.invalid> - 2016-11-01 15:19 -0400
          Re: Huge data set Find-Replace GS <gs@v.invalid> - 2016-11-01 19:12 -0400
            Re: Huge data set Find-Replace "L. Howard" <lhkittle@comcast.net> - 2016-11-01 18:01 -0700
              Re: Huge data set Find-Replace GS <gs@v.invalid> - 2016-11-02 00:47 -0400

csiph-web