+ Reply to Thread
Results 1 to 6 of 6

select non empty data and paste to another sheet

  1. #1
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    select non empty data and paste to another sheet

    Hi All,

    How can I copy non empty values in a column and paste it into another column in another sheet using vba.

    For example I have data in column C in sheet1 and I want to celect non empty cells from C5 downwards and paste it to column A sheet2.

    Thanks,

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: select non empty data and paste to another sheet

    Try:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: select non empty data and paste to another sheet

    Autofilter on non-empty cells and copy Visible range.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: select non empty data and paste to another sheet

    thanks Oily. It gives an error "Object required"
    Any idea how can I get rid of that?

    Quote Originally Posted by Olly View Post
    Try:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: select non empty data and paste to another sheet

    Check the codenames of the worksheets you are actually trying to reference.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: select non empty data and paste to another sheet

    Try something like this......

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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 and paste data to bottom empty row on new sheet
    By Alex0929 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-16-2014, 04:29 PM
  2. [SOLVED] Macro-Copy and paste the new data to the next empty row on summary sheet
    By ttn2b in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-14-2014, 12:02 PM
  3. [SOLVED] Copy And Paste on Another Sheet ( next time paste data from empty row )
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-17-2014, 02:29 AM
  4. cant select specific data and paste in next empty cell
    By comp23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2012, 08:01 AM
  5. Copy Data & Paste Another Sheet Empty Row
    By johncena in forum Excel General
    Replies: 7
    Last Post: 03-02-2010, 07:47 AM
  6. Editting Macro to Select Last Empty Column to Paste Data
    By Zaraf in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-05-2008, 11:40 AM
  7. [SOLVED] I need to find the first empty row in a sheet to paste data to
    By rgbivens in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2005, 03: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