+ Reply to Thread
Results 1 to 3 of 3

Create new rows, with a macro running over all Worksheets

  1. #1
    Registered User
    Join Date
    03-13-2015
    Location
    Milwaukee, America
    MS-Off Ver
    2010
    Posts
    8

    Create new rows, with a macro running over all Worksheets

    Hey,

    I created a macro which loops through every worksheet for a certain word. If that word is found on a worksheet it should copy every value in a row one after the other and copy it into a new row on a specific worksheet, until there is no value anymore in that certain row. I created this Macro, but it doesn't work and I don't really know where I made a mistake. If I want to

    Please Login or Register  to view this content.
    I checked with a MsgBox, that it loops through the different Sheets, but it doesn't fill the var variables at all. Any suggestions where I made a mistake in the Loops or If statements?

    Thank you!

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Create new rows, with a macro running over all Worksheets

    You are not actually referring to the sheets in your code
    Please Login or Register  to view this content.
    Last edited by StephenR; 03-31-2015 at 10:33 AM.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Create new rows, with a macro running over all Worksheets

    One thing is that you are not correctly looping through the sheets. Your sheet identify is the variable "I" but nowhere do you actually use "I" as a proper sheet reference.

    Please Login or Register  to view this content.
    In addition, I am not sure what you are trying to do with the variable "counter" but I am pretty sure it is wrong.

    Provide clear and concise details on what you are trying to accomplish for an exact answer.

+ 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. Running Macro VBA in multiple worksheets.
    By AdeMet in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-19-2015, 02:17 PM
  2. [SOLVED] Running Macro on same row in two worksheets
    By dale040205 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2012, 08:04 AM
  3. How to create a Macro that looks for matching rows of data on 2 different worksheets
    By NYC4LIFE in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 12-31-2011, 10:55 AM
  4. Running macro on certain worksheets
    By chunte in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-21-2009, 02:21 PM
  5. [SOLVED] Running Macro/VBA in multiple worksheets.
    By YellowBird in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-09-2006, 12:30 AM

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