Results 1 to 3 of 3

Ignore blank cells while copying and pasting macro

Threaded View

dagindi Ignore blank cells while... 04-06-2011, 04:47 PM
Leith Ross Re: Ignore blank cells while... 04-07-2011, 01:50 AM
watersev Re: Ignore blank cells while... 04-07-2011, 04:13 AM
  1. #1
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Ignore blank cells while copying and pasting macro

    attached is a sample worksheet.

    The red bordered box shows how data appears in a spreadsheet.

    I use the following macro to copy the data in the boxed range to a new workbook.

    Sub Macro1()
    
        Application.Goto Reference:="New_Range2"
        Selection.SpecialCells(xlCellTypeVisible).Copy
        Workbooks.Add
        Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
            xlNone, SkipBlanks:=True, Transpose:=False
        Application.CutCopyMode = False
    End Sub
    I cannot figure out how to get the data to look like how I have it in the green bordered box.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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