+ Reply to Thread
Results 1 to 3 of 3

VBA Find first non-blank cell, then copy and paste the entire row

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    9

    VBA Find first non-blank cell, then copy and paste the entire row

    Very new to VBA, so this is probably a simple question.

    I want to find the first non-blank cell in Column J, then copy that entire row to another sheet(Sheet 2). Sheet2 will already have some rows filled from previous data, so it will need to paste the "non-blank cell row" on the first available row.

    Most of the time, Column J will be blank. So I also need it not to give an error message if it can't find a non-blank cell.

    Thanks in advance for the help!
    Last edited by Misterturtle; 05-16-2013 at 10:25 PM.

  2. #2
    Registered User
    Join Date
    05-07-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: VBA Find first non-blank cell, then copy and paste the entire row

    I found this:

    With Columns("B")
    .Find(what:="*", after:=.Cells(1, 1), LookIn:=xlValues).Activate
    End With

    This finds the first non-blank cell, however it just selects it. How do I copy the row of the cell Find() well, finds.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA Find first non-blank cell, then copy and paste the entire row

    Try like this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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