+ Reply to Thread
Results 1 to 7 of 7

Help copy paste problem

  1. #1
    Registered User
    Join Date
    05-15-2015
    Location
    Macedonia
    MS-Off Ver
    2016
    Posts
    3

    Help copy paste problem

    Hello

    I have one problem with macros, problem is simple i want to copy column A,b,c,d till the end of D and paste in new excel document. Problem are blank rows in column A.
    One more think column finish in different rows every time.
    Now is 21 other time 50 next 30.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,285

    Re: Help copy paste problem

    Sub Macro3()
    Range("A1:F21").AutoFilter
    ActiveSheet.Range("$A$1:$F$21").AutoFilter Field:=1, Criteria1:="<>"
    Range("A1:F21").Copy
    Workbooks.Add
    Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Application.CutCopyMode = False
    ActiveSheet.Range("$A$1:$F$21").AutoFilter Field:=1
    ThisWorkbook.Activate
    End Sub

  3. #3
    Registered User
    Join Date
    05-15-2015
    Location
    Macedonia
    MS-Off Ver
    2016
    Posts
    3

    Re: Help copy paste problem

    Nop i need blank rows to stay in column A and f21 is always different i need something like this
    Range("A1:D1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy

    But with this one i copy A till first blank row
    Last edited by Gnaum; 10-08-2016 at 08:20 AM.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help copy paste problem

    Hi Gnaum

    Something like this perhaps...
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Registered User
    Join Date
    05-15-2015
    Location
    Macedonia
    MS-Off Ver
    2016
    Posts
    3

    Re: Help copy paste problem

    Thanks @jaslake this one helped me alot.
    Now i have to paste this in another document but it have to search for word in column A then paste in same row in column B.

    Example if word "pony" is in A30 then paste to B30 if "pony" is in A40 then paste to B40
    Last edited by Gnaum; 10-10-2016 at 04:52 AM.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help copy paste problem

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help copy paste problem

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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/paste problem
    By Sidsel in forum Excel General
    Replies: 2
    Last Post: 02-11-2016, 06:14 AM
  2. [SOLVED] Excel Macro - Copy & Paste (Font) problem & Delete Last Added Rows problem
    By LennartB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2015, 06:58 AM
  3. problem with copy / paste
    By michael143 in forum Excel General
    Replies: 1
    Last Post: 04-22-2012, 09:49 AM
  4. Replies: 3
    Last Post: 12-09-2005, 01:20 PM
  5. copy and paste problem
    By chindo in forum Excel General
    Replies: 1
    Last Post: 11-10-2005, 04:45 AM
  6. copy/paste problem
    By butters14 in forum Excel General
    Replies: 0
    Last Post: 02-14-2005, 03:56 AM
  7. Replies: 1
    Last Post: 01-04-2005, 06:06 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