+ Reply to Thread
Results 1 to 8 of 8

Find, Cut and Paste a variable Range

  1. #1
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro 2003 / 2010
    Posts
    423

    Find, Cut and Paste a variable Range

    Hi,

    This macro Finds the abbreviation FL in in Column A then selects the row containing FL and all rows below with the exception of the bottom 2 rows and cuts and pastes the section to A5.

    Is there a way to do this without specifiying the row references to be cut (263:307) which are variable.

    Sample attached - all help much appreciated.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-27-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    86

    Re: Find, Cut and Paste a variable Range

    Hi Timbo,

    Instead of using the find method use the filter options. Select the visible cells -> cut -> paste at your destination range.

    The file you have attached contains empty records.

    Regards,
    lokicl

  3. #3
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro 2003 / 2010
    Posts
    423

    Re: Find, Cut and Paste a variable Range

    Hi lokicl,

    That won't work because the example A263 is the only cell that contains FL the cells below it don't. The data is in columns C:F.

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

    Re: Find, Cut and Paste a variable Range

    Try the attached.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro 2003 / 2010
    Posts
    423

    Re: Find, Cut and Paste a variable Range

    Hi,

    This works but I need to extend it to cut and paste the entire rows selected not just the values in column A.
    Please Login or Register  to view this content.

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

    Re: Find, Cut and Paste a variable Range

    Change
    .
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro 2003 / 2010
    Posts
    423

    Re: Find, Cut and Paste a variable Range

    That works fine.

    Is there a way to change this bit?

    Please Login or Register  to view this content.
    So that it isn't hard coded to Sheet2 i.e. it is coded to the active worksheet.

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

    Re: Find, Cut and Paste a variable Range

    Please Login or Register  to view this content.

+ 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] Copy and Paste Variable Range
    By massivemike in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2013, 09:34 AM
  2. [SOLVED] Copy/Paste Values from Variable Range to Corresponding Variable Range
    By Cpetersoc in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-14-2012, 08:20 AM
  3. Variable range copy paste
    By scottsanpedro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2012, 09:10 AM
  4. Find, Copy, Paste variable rows to another sheet
    By wkhor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2011, 07:37 PM
  5. Find, offset, paste variable
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-02-2009, 04:15 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