+ Reply to Thread
Results 1 to 12 of 12

extract rows based on value in column A

  1. #1
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    extract rows based on value in column A

    hi guys,

    my limited knowledge is letting me down.

    I have a worksheet with around 140000 rows. for each time any of the 4 values below appear on the worksheet, i need that row copied and transposed to a new worksheet we'll call "summary".

    Ideally it would result in a table with 4 columns on that worksheet headed with the values below.

    The values are; PRODUCT NUMBER, PRODUCT DESCRIPTION, PRODUCT TYPE and PRODUCT SELECTION.

    I've attached an example with just over 1000 rows, it carries on in the same fashion for 140000 rows.

    Thanks for any help you can offer guys.
    Attached Files Attached Files

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

    Re: extract rows based on value in column A

    Please show atleast 1 model of expected output in a separate sheet for better understanding of your output requirement


    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

  3. #3
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: extract rows based on value in column A

    Hi Sixthsense,

    i've attached a file with an example of the output i need. hope this helps?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-07-2013
    Location
    cbe
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: extract rows based on value in column A

    try this code
    Please Login or Register  to view this content.

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

    Re: extract rows based on value in column A

    Please Login or Register  to view this content.
    Last edited by AB33; 03-12-2013 at 07:35 AM.

  6. #6
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: extract rows based on value in column A

    Hi Punar,

    i tried your code but it debugs here;
    Please Login or Register  to view this content.
    It's possibly because on occasion a row might be blank?


    Hi AB33,

    Your code does exactly what you said it would, however i really do need the data in 4 columns, as i need the data to match up with the data it's sat with on the original sheet
    Last edited by fabrecass; 03-12-2013 at 06:07 AM.

  7. #7
    Registered User
    Join Date
    02-07-2013
    Location
    cbe
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: extract rows based on value in column A

    ya its because of the blank only and if so please calculate the lastrow based upon the column which has the highest content in it

  8. #8
    Registered User
    Join Date
    02-07-2013
    Location
    cbe
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: extract rows based on value in column A

    let me know whether there is any condition like if product no is empty then its related details should not be copied??

  9. #9
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: extract rows based on value in column A

    Hi Punar,

    last row with data is 140737 and last column is IJ.

    if row blank then resume next?

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

    Re: extract rows based on value in column A

    I have amended my code (See above code #5) and see if this works for you.
    Note that I have assumed you have a sheet named summary and headers in row1 as above requested
    Last edited by AB33; 03-12-2013 at 07:48 AM.

  11. #11
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: extract rows based on value in column A

    Hi AB33,

    thanks for your response. However, it debugs at the line of code below, errors message stating "Method 'PasteSpecial' of object 'Range' failed", i hit debug, close, then all of my menu options are greyed out!

    Please Login or Register  to view this content.

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

    Re: extract rows based on value in column A

    Please see attached. It does not show any error
    Attached Files Attached Files

+ 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