+ Reply to Thread
Results 1 to 3 of 3

Copy and past special in the same cells EXCEL VBA Code

  1. #1
    Registered User
    Join Date
    10-28-2015
    Location
    Erlanger, KY
    MS-Off Ver
    Office 2010
    Posts
    26

    Copy and past special in the same cells EXCEL VBA Code

    I need to copy just the cells that are blank in column and paste them in the same cell A.. I get an error when it goes to paste... here is the code that I am using and a sample sheet is attached.. the sheet is much bigger than this.

    #Sub CopyPasteRowBlankCells()
    Application.ScreenUpdating = False
    Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Copy
    Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.PasteSpecial Paste:=xlPasteValues
    Application.ScreenUpdating = True
    End Sub#
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Copy and past special in the same cells EXCEL VBA Code

    Hi, maybe you can use this peace of code:
    Please Login or Register  to view this content.
    Cheers
    Erwin
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  3. #3
    Registered User
    Join Date
    10-28-2015
    Location
    Erlanger, KY
    MS-Off Ver
    Office 2010
    Posts
    26

    Re: Copy and past special in the same cells EXCEL VBA Code

    That worked perfect.

    Thanks

+ 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. vba code for Transpose past special from col to rows- Insert serial No
    By srinivasan1965 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2016, 12:26 AM
  2. [SOLVED] Code to copy and past information from many workbooks
    By phbryan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2015, 03:39 PM
  3. [SOLVED] Copy Past cells doesnt work in EXCEL file.
    By blake20 in forum Excel General
    Replies: 2
    Last Post: 08-26-2014, 02:26 AM
  4. Replies: 0
    Last Post: 03-20-2014, 11:51 AM
  5. Advice and help with a copy past code or filldown formula code
    By KELLIS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2013, 02:07 PM
  6. Excel Copy Problems - Past special problem
    By luendab in forum Excel General
    Replies: 2
    Last Post: 04-12-2012, 03:53 PM
  7. Copy-past special a worksheet with page setup/print format
    By rickyd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2011, 12:46 PM

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