+ Reply to Thread
Results 1 to 7 of 7

Copy & paste a row (without leaving an empty row behind!) if a cell contains a value

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    41

    Copy & paste a row (without leaving an empty row behind!) if a cell contains a value

    Hi all!

    I have 2 worksheets, one called "Consolidated" and one called "Converted".

    I would like to have a spreadsheet where I press the update button and a macro runs that searches for the word "Converted" in column E on the Consolidated spreadsheet (the original). When it finds it, I would like the entire row to be cut and pasted onto the "Converted" worksheet.

    I have managed to do this with my current code:

    Please Login or Register  to view this content.
    However when this macro runs, the row left behind on the original sheet is a blank row and I don't want this. I would like it to be continuous spreadsheet, not dotted with random blank rows!

    If anybody can see a solution to this it would be greatly appreciated!

    Thanks!!

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy & paste a row (without leaving an empty row behind!) if a cell contains a value

    You need to loop back ward if you wish to delete(cut) a row.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-15-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Copy & paste a row (without leaving an empty row behind!) if a cell contains a value

    Hi AB33,

    Thanks for replying! I tried the code but it seems to be breaking on this part:

    Please Login or Register  to view this content.
    Thanks!

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy & paste a row (without leaving an empty row behind!) if a cell contains a value

    Sorry! My bad!

    Replace

    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    One line

  5. #5
    Registered User
    Join Date
    11-15-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Copy & paste a row (without leaving an empty row behind!) if a cell contains a value

    Hey - did that! Unfortunately it is the same result as my code - the blank rows are still left behind on the original sheet

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy & paste a row (without leaving an empty row behind!) if a cell contains a value

    Please attaché a sample

    Try these lines

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-15-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Copy & paste a row (without leaving an empty row behind!) if a cell contains a value

    Awesome that line of code worked! Thanks so much!

+ 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. [SOLVED] Leaving a Cell Empty
    By Bob Folks in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2014, 01:17 AM
  2. [SOLVED] Copy and paste from one sheet to another leaving out hidden cells
    By si_1970 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-20-2013, 06:41 AM
  3. copy and paste to next empty cell
    By Friday in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-15-2011, 01:00 AM
  4. Copy/Paste if cell below is empty
    By poptcorn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2011, 09:36 AM
  5. [SOLVED] Leaving an empty cell empty
    By GRL in forum Excel General
    Replies: 5
    Last Post: 04-22-2006, 12:50 PM

Tags for this Thread

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