+ Reply to Thread
Results 1 to 3 of 3

loop through open workbooks and replace values

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    loop through open workbooks and replace values

    Hello,

    The code below is supposed to loop through rows in column A and then loop through the worksheets in the open workbook and replace the value it finds in column A with column B.
    Logically it makes sense to me but the code is not doing its job in replacing the values in the other open workbooks. It is, though, replacing the values in its own workbook.
    Please Login or Register  to view this content.
    I would really appreciate any light on this.

    Thank in advance

  2. #2
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: loop through open workbooks and replace values

    Try changing 'Cells.Replace' to 'ws.Cells.Replace'

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: loop through open workbooks and replace values

    I could use an EMOJI that slaps his forehead with his hand! I can't believe i missed that one!

    Thanks!

+ 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. [SOLVED] Replace Array values through loop
    By brainzlp in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-24-2016, 10:56 PM
  2. [SOLVED] Open 2 related workbooks in a loop.
    By swallis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2015, 07:14 PM
  3. Loop Through Open Xcel Workbooks
    By pablowilks in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2013, 03:19 PM
  4. [SOLVED] Loop to open all workbooks in folder and append data to single sheet
    By beng404 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2013, 01:45 PM
  5. Open workbooks with variables in filename using loop
    By as1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2011, 01:17 PM
  6. [SOLVED] Loop through, open, and modify all workbooks in file
    By Jason in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2005, 05:05 PM
  7. Loop Through All Open Workbooks
    By scott in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-31-2005, 11:06 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