+ Reply to Thread
Results 1 to 7 of 7

Copying the range of rows between two strings...please help

  1. #1
    Registered User
    Join Date
    02-09-2012
    Location
    Manassas, Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    30

    Copying the range of rows between two strings...please help

    Hi Friends,

    Can you please guide me on how I can copy a range of rows between two strings occurring in ColumnA. Say between A1= Workstations and A10= Machines?
    Many Thanks...

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Copying the range of rows between two strings...please help

    If you know it is a1 and A10, then just

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-09-2012
    Location
    Manassas, Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Copying the range of rows between two strings...please help

    Thanks Bob,
    but I have a code which will search for the instances at which these strings occur...so it cannot always be A1 and A10 cells..it can be any...
    I am looking for a function which will help me to copy the row based on a cell value

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Copying the range of rows between two strings...please help

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-09-2012
    Location
    Manassas, Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Copying the range of rows between two strings...please help

    Thank you very much Bob. But I need a bit more guidance from you.
    My problem explanation is:
    I have to match the column A values(IMP_Plad_BF3 etc.) in Worksheet 'a' with Column A values in Worksheet 'b'. Once a match is found I have to look for a String "WS Group Totals:" in column B of Worksheet 'a'. Once the string is found I have to copy the entire range of rows from column A match to Column B match and paste it in a separate Worksheet "c".. I have written the code which is throwing up error. Can you please solve the error for me..thanks...I have also attached the original Workbook for your reference...

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by shrimic; 02-13-2012 at 03:55 PM.

  6. #6
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Copying the range of rows between two strings...please help

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-09-2012
    Location
    Manassas, Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Copying the range of rows between two strings...please help

    Thank you very much Bob. As per my requirement if I run the macro it should copy only the rows A28 to A34 and A35 to A41...which are the blocks for the values Column A of WkSht'a' matches with that of Column A of WkSht'b'...but it is copying some other rows as well...can you please help me with that...Thank man...

+ 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