+ Reply to Thread
Results 1 to 3 of 3

Copy data from one sheet to another while skipping blanks and certain rows

  1. #1
    Registered User
    Join Date
    02-03-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2013
    Posts
    22

    Copy data from one sheet to another while skipping blanks and certain rows

    Hi. I'm trying to copy data from one sheet to another, but I want it to skip blanks and a row that has data on it. I've attached my spreadsheet that I need help on.

    I want o9:o12, o14:o17, o19:o22, o24:o27, and o29:o34 from Sheet1 to be moved to A8:A33 on Sheet 2.

    Rows 13, 18, 23, and 28 on Sheet1 need to be left out.

    On Sheet2, I want the data to look like below with no spaces between each menu item.

    Cinnamon Apple Slices
    Fresh Red Delicious Apple


    Thanks for your help!
    Last edited by gawk1980; 02-14-2013 at 11:16 AM.

  2. #2
    Registered User
    Join Date
    02-03-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Copy data from one sheet to another while skipping blanks and certain rows

    Hi! I thought I had this solved, but I didn't. I updated my worksheet with new data and I wanted to note that cells, o9:o12, o14:o17, o19:o22, o24:o27, and o29:o34, have a vlookup formula that makes the code below not work.

    Sub Copy_Stuff2()
    Application.ScreenUpdating = False
    Sheets("Sheet2").Range("A8:A33").ClearContents
    With Sheets("Sheet1").Range("o9:o12, o14:o17, o19:o22, o24:o27, and o29:o34").SpecialCells(xlCellTypeConstants)
    .Copy
    Sheets("Sheet2").Range("A8").PasteSpecial xlPasteValues
    'ClearContents 'Clear source data
    End With
    Application.CutCopyMode = True
    Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-03-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Copy data from one sheet to another while skipping blanks and certain rows

    Any help???

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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