+ Reply to Thread
Results 1 to 2 of 2

VBA to identify if row=row +1 to copy all equal rows and paste in sheet based on cell

  1. #1
    Registered User
    Join Date
    07-26-2019
    Location
    Norway
    MS-Off Ver
    16
    Posts
    0

    VBA to identify if row=row +1 to copy all equal rows and paste in sheet based on cell

    Hi!

    I am having a bit of a struggle and hope you can help me out.
    I have two sheets: a Data sheet and a Print sheet. The Print sheet goes down to ~200 rows and the Data sheet down to ~2200 rows. Below is a small cut of how the data is listed

    Print sheet:
    Capture.PNG

    Data sheet:
    Capture2.PNG
    The goal is to, from the Print sheet, to go through the Data sheet and find the same value in column B; A-A, B-B etc. to then copy/extract all the column B-values and insert them into the Print sheet (column G and H).
    However, the existing data cannot be edited. The rows may shift down, but the existing data needs to stay.

    Ideal result:
    Print sheet:
    Capture3.PNG

    I used nested for-loops to identify the same column B-values in both sheets, which works. When it comes to identify if row=row+1 i tried to use a do while-loop, and i have managed to identify the number of equal rows in the datasheet.
    I need help to stitch everything together!
    Last edited by Borgermester; 07-26-2019 at 03:44 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello Borgermester,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Copy and paste equal rows from master sheet to other sheets
    By Sasquatch2014 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2017, 09:42 AM
  2. Copy rows based on cell value and paste on a new sheet
    By cowboy14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2017, 03:09 PM
  3. [SOLVED] Identify duplicate rows and copy/Paste the first cell to all cells of equal rows
    By vs5 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-15-2014, 06:31 AM
  4. Macro to copy rows based on moving date and paste the rows into an identical sheet
    By ivandc1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2014, 11:59 AM
  5. Copy and Paste Rows based on Criteria onto another sheet and sort based on oldest item
    By Kushal8684 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 05:37 AM
  6. Replies: 1
    Last Post: 10-28-2012, 01:13 AM
  7. Replies: 1
    Last Post: 05-23-2012, 03:02 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