+ Reply to Thread
Results 1 to 4 of 4

Offset The Column Dictionary is Replacing Value in.

  1. #1
    Registered User
    Join Date
    02-09-2013
    Location
    Alberta, CA
    MS-Off Ver
    O365
    Posts
    80

    Offset The Column Dictionary is Replacing Value in.

    Hello,

    I have two columns of data and my goal is... The macro looks through column B and replaces the value in column A.

    Presently I have a dictionary that loads a bunch of values into an array.

    Search Criteria New Value
    Bob BDone
    Chuck CDone


    Now if the data looks like this:

    A B
    1 Data Data
    2 Data Data
    3 Data Chuck
    4 Data Data

    The result I'm trying to get would look like this:

    A B
    1 Data Data
    2 Data Data
    3 CDone Chuck
    4 Data Data

    Unfortunatenly I can only get it to replace the found value. Offsetting the range naturally just changes where it looks to replace the value.

    A B
    1 Data Data
    2 Data Data
    3 Data CDone
    4 Data Data


    The code I'm using which at this point only replaces the range it is looking through.
    Please Login or Register  to view this content.
    The reason for using a dictionary is the speed. I had a find and replace in another portion of this project and it would take an additional 10-30 minutes depending on the number of lines. Using the dictionary reduced the time drastically.

  2. #2
    Registered User
    Join Date
    07-21-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    58

    Re: Offset The Column Dictionary is Replacing Value in.

    Hi,
    try with this macro that should be faster:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-09-2013
    Location
    Alberta, CA
    MS-Off Ver
    O365
    Posts
    80

    Re: Offset The Column Dictionary is Replacing Value in.

    Thank you! I'll give it a shot.

  4. #4
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    971

    Re: Offset The Column Dictionary is Replacing Value in.

    Here's another way:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Why dictionary very slow ,is dictionary have maksimum data
    By daboho in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-30-2018, 03:57 PM
  2. Adding dictionary into dictionary and retrieving data
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-08-2018, 06:52 AM
  3. [SOLVED] Replacing offset with non-volatile functions
    By beth6891 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2016, 10:49 AM
  4. [SOLVED] Dictionary or Scripting.Dictionary. Binding Referencing Dim-ing. Sub routines and Function
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 07-12-2016, 08:28 AM
  5. Dictionary - Using a dictionary of dictionaries to hold individual orders
    By wazimu13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2015, 08:32 PM
  6. Replies: 3
    Last Post: 06-01-2014, 10:26 AM
  7. Dictionary Data: enhance meanings in column D through column A
    By wali in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2009, 04:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1