+ Reply to Thread
Results 1 to 6 of 6

Loop through sheets with Name starting with AIPRSU to add a new row with data from row 2

  1. #1
    Registered User
    Join Date
    06-04-2022
    Location
    Prague
    MS-Off Ver
    Office 365
    Posts
    7

    Loop through sheets with Name starting with AIPRSU to add a new row with data from row 2

    Hello!

    I need to have a macro to loop through sheets with Name starting with AIPRSU to add a new row under the headers (so the new row should appear in position 2) and this new row should be filled with data from the previous row 2 (which will then become row 3).

    So to recap:
    - The macro should loop in each sheet starting with name "AIPRSU"
    - For each sheet, create a new empty row right under the headers' row
    - the new empty row must be filled with the same data contained in the row right below this new empty row (which is the line that was previously occupying the new empty row's position)

    Attached you can find the template I am working on.

    Many thanks !

    F
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-12-2021
    Location
    CT
    MS-Off Ver
    365
    Posts
    462

    Re: Loop through sheets with Name starting with AIPRSU to add a new row with data from row

    Give this a whirl
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-04-2022
    Location
    Prague
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Loop through sheets with Name starting with AIPRSU to add a new row with data from row

    Thanks,
    I get an error when running this macro, it says "Object Required".
    Moreover, do you happen to be able to implement also the copy of data from the other row as mentioned in my post? It seems to be missing in your coding.

    Thanks!
    F

  4. #4
    Valued Forum Contributor
    Join Date
    10-12-2021
    Location
    CT
    MS-Off Ver
    365
    Posts
    462

    Re: Loop through sheets with Name starting with AIPRSU to add a new row with data from row

    My apologies, this will work. Coffee hadn't kicked in yet. Also, this will make a duplicate row (row two will now equal row 3)... if that's not your intention, let me know

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-04-2022
    Location
    Prague
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Loop through sheets with Name starting with AIPRSU to add a new row with data from row

    Thank you very much! This solution worked perfectly!

  6. #6
    Valued Forum Contributor
    Join Date
    10-12-2021
    Location
    CT
    MS-Off Ver
    365
    Posts
    462

    Re: Loop through sheets with Name starting with AIPRSU to add a new row with data from row

    Great! And thanks for the rep

+ 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. Replies: 2
    Last Post: 06-24-2022, 03:28 AM
  2. Replies: 5
    Last Post: 06-05-2022, 09:24 PM
  3. Loop through a set number of sheets starting with inputted initial sheet name
    By declan1983 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2022, 12:01 AM
  4. Loop starting from A2
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2014, 02:40 PM
  5. Is it possible to use a For Each loop starting at the bottom of a range
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2013, 08:18 PM
  6. Adding length to For Next loop after starting
    By alcarl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2012, 02:41 PM
  7. Starting poing for loop not static
    By oakman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2007, 12:24 PM

Tags for this Thread

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