+ Reply to Thread
Results 1 to 11 of 11

MAcro to extract rows matching a criteria and paste in another sheet

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    5

    MAcro to extract rows matching a criteria and paste in another sheet

    Hi all

    I have an excel that is a ledger of data, i need to be able to extract only specific rows and paste them in another sheet.
    For eg, in the below get rid of all italicized text and paste only the rows in bold header a new excel/tab. These Rows can occur anywhere in the excel. Pls help as priority!!


    Subledger Accounting Account Analysis Report Report Date 27-Feb-12
    LPL Ledger Date From 2012-01-01T00:00:00.000-06:00 Date To 2012-01-31T00:00:00.000-06:00 Page 1 of 1


    Ledger / Ledger Set LPL Ledger
    Period From 12-Jan
    Period To 12-Jan
    Accounting Flexfield From 101.0000.511210.0000.000000.000.0000
    Accounting Flexfield To 101.9999.511210.9999.ZZZZZZ.999.9999
    Balance Type Actual
    Encumbrance Type / Budget Name
    Include Zero Amount Lines No
    Include User Transaction Identifiers No
    Include Statistical Amount Lines No
    Include Accounts With No Activity No



    Subledger Accounting Account Analysis Report Report Date 27-Feb-12
    LPL Ledger Date From 2012-01-01T00:00:00.000-06:00 Date To 2012-01-31T00:00:00.000-06:00 Page 1 of 1


    Ledger Name LPL Ledger Ledger Currency USD Balance Type Actual


    Account 101.1101.511210.0000.000000.000.0000 Description LPL Financial.Corporate.Insured Cash Account.Default.General.Default.Default

    Beginning Balance for Period 12-Jan 0 0


    Source Category GL Date Event Class Transaction Number Line Description Debit Credit Sponsor Name / Supplier Name Accrual Period Check Account Descrption
    STANDARD Bank Statements(1) 31-Jan-12 ICA LPL Fee _Jan 12 11,015,157.52 101.1101.511210.0000.000000.000.0000
    STANDARD Reclass 31-Jan-12 Reclass AXA MMKT and ICA fee 748,125.17 101.1101.511210.0000.000000.000.0000
    STANDARD Allocation 31-Jan-12 Re-allocate January 10,267,032.35 101.1101.511210.0000.000000.000.0000
    Period Total 11,015,157.52 11,015,157.52

  2. #2
    Registered User
    Join Date
    12-21-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    Please post a sample file for quicker resolution.
    Hope this helps.
    Kiran

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    Excel 1 after macro execution should result in excel2
    Attached Files Attached Files

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    Heres one way

    Please Login or Register  to view this content.
    Last edited by mike7952; 01-05-2013 at 04:04 AM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Registered User
    Join Date
    12-21-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    Try this, I have assumed that your data headers in Columns A & B are Source and Category respectively and last column is Account (Col L)
    Put this code in the first file and run the "Get_Data" macro.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-04-2013
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    works like a charm!!! Thank you very much!

  7. #7
    Registered User
    Join Date
    12-21-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    Glad to know it had worked. Happy to support any thime!


    Thank those that provided useful help, its nice and its very well appreciated...use the star on the lower left of the post

  8. #8
    Registered User
    Join Date
    01-04-2013
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    Excel experts

    ran into a runtime error...attaching the sample sheet i used...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-04-2013
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    Kiran

    I tried this, however it does not seem to work with the attached sheet...brins.xlsm. It seems to work only for one specific type of format/order of data

    pls help

    Rgds
    Vandana

  10. #10
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    Thy this. It was giving the error because of the merged cells

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    12-21-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: MAcro to extract rows matching a criteria and paste in another sheet

    As mentioned earlier if the columns are fixed it should work.
    Made some minor changes, try if this works.
    Please Login or Register  to view this content.
    Also, Mike's code works perfect. Hope it will solve your problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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