+ Reply to Thread
Results 1 to 9 of 9

Copy Blank columns without header

  1. #1
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Smile Copy Blank columns without header

    Hi all,

    I am facing challenges in my coding while I am getting the entire column as blank.

    > I need to copy the data from one sheet to another sheet wherein i have standard columns in the both the sheet.
    > I will copy and paste the each column separately from one sheet to another because that is my project requirement.
    > My codlings are working fine if my columns are filled with data but the problem starts if the entire column is empty wherein the headers are included in the destination sheet. I just want to show only blank without headers.
    > Also my copy range always starts with 3rd row with Used range of Column A.

    Please assist me. I have attached the sample file for reference.

    Thanks.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Copy Blank columns without header

    You forgot to post the code.

    Please Login or Register  to view this content.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,080

    Re: Copy Blank columns without header

    Not sure why you can't just copy the block but here you go:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,080

    Re: Copy Blank columns without header

    @Vraag en antwoord: note:

    > I will copy and paste the each column separately from one sheet to another because that is my project requirement.

  5. #5
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Copy Blank columns without header

    Hi Vraag & TMS,

    Thank you so much for your reply.

    But i will paste the details as per the Used range in my destination sheet based on Column A. Below is my code.
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Copy Blank columns without header

    Thank you so much all .. I tuned my code and now it is working perfectly.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,080

    Re: Copy Blank columns without header

    Maybe this then (untested)

    Please Login or Register  to view this content.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,080

    Re: Copy Blank columns without header

    You're welcome. Thanks for the rep.


    Maybe post your tuned code so we can compare notes

    Why DO you have to copy column by column? It would make more sense (based on what you have told us so far) to copy the whole range in one go.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  9. #9
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Copy Blank columns without header

    Thanks TMS. Will do it..

+ 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 to delete blank columns (with header)
    By Tgbell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2019, 09:03 AM
  2. [SOLVED] Copy columns based on header (Without header)
    By Michael_BU in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-15-2014, 08:07 AM
  3. Need to copy header row in group to all rows below header; stop if blank and repeate
    By jmcaleer10 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2013, 11:09 AM
  4. Deleting a blank Columns (with header) in excel 2010
    By gabilk20 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 10:09 PM
  5. macro to delete blank columns - includes header row
    By bluesea in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2012, 12:18 PM
  6. insert blank row and header copy
    By msmick in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-29-2011, 02:03 AM

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