+ Reply to Thread
Results 1 to 5 of 5

VBA to copy without the header

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    VBA to copy without the header

    Hello,

    I am trying to fix code which will copy the entire column without an header. But copy to be done from cell 6 and below. Header is in cell 4.
    I was able to put together below code but could not make it work to select cell 6 and below.

    Please Login or Register  to view this content.
    Please help..

    Thanks,
    Shiva
    Keep the Forum clean :


    1. Use [ code ] code tags [ /code ]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. Show appreciation to those who have helped you by clicking * Add Reputation below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA to copy without the header

    Please Login or Register  to view this content.
    Why are you searching the rows when you said it is in row 4 of the columns?

    Please Login or Register  to view this content.

    This is just problematic
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: VBA to copy without the header

    opps sorry..

    it is A4 to Z4

    Please Login or Register  to view this content.
    I added your code like below, but copy range is formulated. So how to make it copy visible cells?

    Please Login or Register  to view this content.
    I know this is very basic one, But i could not come up with only this code after trial n error

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA to copy without the header

    Why did you leave in the line that I told you was wrong?

    Please Login or Register  to view this content.
    Why didn't you say you needed the visible cells before? You can use specialcells to get the visible range.

    Please Login or Register  to view this content.
    I don't understand how you couldn't come up with better code for the last part seeing as how the first part of your code is the better code. Why didn't you just duplicate it and use a variable like rngAddress2 and paste to that found range? I am not trying to be mean I just think that some of this is common sense and by now you should know some of this. I am more than happy to give you an exact answer, I just hope that you will eventually be able to figure this stuff out on your own.


    Edit: Exact Answer:
    Please Login or Register  to view this content.
    Last edited by stnkynts; 08-28-2014 at 01:28 PM.

  5. #5
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: VBA to copy without the header

    Thanks stnkynts,

    Well, I have been learning code from this site.. Top code i did not write. It was I had noted down in my diary when someone helped me long time back in this forum.
    Before posting code, I try building it for an hour to see if I can make it own. But when I dont, I turn out for your expert advices.

    I got Run Time Error 424: Object Required on below line

    Please Login or Register  to view this content.
    Anyways, I used part of your code in my old vba with your logic of rngAddress2 as variable and it works fine.

    Working for me:
    Please Login or Register  to view this content.
    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. Copy data from header to header in consolidation sheet
    By Ignesh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-12-2013, 04:10 AM
  2. Replies: 1
    Last Post: 10-05-2013, 03:35 PM
  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. Automatically copy row header to column header...
    By Soons in forum Excel General
    Replies: 4
    Last Post: 10-16-2008, 11:38 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