+ Reply to Thread
Results 1 to 14 of 14

merging one columns data to the bottom of another

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415

    merging one columns data to the bottom of another

    hi guys could anyone give me the code to attached one column of data to the bottom of another?
    ie the next available cell

    so column a has 250 lines of data the data from another column will then go diectly into 251

    thats not the number i want but the next available

    thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    This Will find the address of the said cell
    Sub FirstEmptyCell()
    MsgBox Range("A65536").End(xlUp).Offset(1, 0).Address
    End Sub
    This will paste to the first empty cell
    Sub MayBeThis()
        Range("D1").Copy Destination:=Range("A65536").End(xlUp).Offset(1, 0)
    End Sub

  3. #3
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    thanks dave
    will try it out

  4. #4
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    dave just as an add on
    what code would you to select all cells with data in
    lets say
    all cells in column c with any cell that has data in it and cut

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Quote Originally Posted by excellentexcel View Post
    dave just as an add on
    what code would you to select all cells with data in
    lets say
    all cells in column c with any cell that has data in it and cut
    Is there a specific row to start?
    Sub CutAndPaste()
    
        Range(Range("C1"), Range("C65536").End(xlUp)).Cut Destination:=Range("A65536").End(xlUp).Offset(1, 0)
    
    End Sub

  6. #6
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    c1 is fine
    thanks

  7. #7
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    apologies i thought i had already linked the page
    i thought i might be able to get round this on my won with a few short cuts and recorded macros but doesnt seem i can

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Quote Originally Posted by excellentexcel View Post
    apologies i thought i had already linked the page
    i thought i might be able to get round this on my won with a few short cuts and recorded macros but doesnt seem i can
    Sorry I don't Use xl'07 yet,
    I have looked at the workbook....
    It would be easier for others if you made the sample just 100 rows deep and explain on the sample what you are trying to achieve, your workbook does not have any details of what your end result should be.
    Attach the workbook to your post, if you do not know how to do that, the forum rules explain it.
    You need to make it as easy as possible for others to help you....

  9. #9
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    hi dave i have posted toe work book on this thread
    http://www.excelforum.com/excel-prog...to-vanish.html
    thanks for your interest/help

+ Reply to Thread

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