Page 1 of 6 123 ... LastLast
Results 1 to 10 of 60

Extract multiple rows matching criteria

This is a discussion on Extract multiple rows matching criteria within the Excel Questions forums, part of the Question Forums category; Hi, I have raw data in Sheet1. The criteria is "Yard Name". I need to extract the respective rows for ...

  1. #1
    Board Regular
    Join Date
    Mar 2010
    Posts
    144

    Cool Extract multiple rows matching criteria

    Hi,

    I have raw data in Sheet1. The criteria is "Yard Name". I need to extract the respective rows for each yard in a different sheet as shown here below. I would like to apply array formula. I use Exel 2003. Please for your help.

    Sheet1
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66503012DSME5354Almi Tanker 158K Suezmax TankerTanker-Lead130015702011-03-092011-07-112011-10-082011-11-14Firm
    66500468STX2039Primosk 51k DWT TankerTanker-Sister690862010-04-202010-11-112010-12-092011-02-15Potential Canceled
    66500543HMD2091Eletson 52k TankerTanker-Sister6551392009-11-032010-04-052010-06-012010-07-31Firm
    66500544H-SAMHO355ZIM Container 10000 TEUCon-Lead145011082011/04/182011/08/162011/10/292012/01/04Potential Canceled
    66500553STX1266Primosk 51k DWT TankerTanker-Lead690862010-05-152010-09-132010-12-092011-02-09Potential Canceled
    66500558SHI1736Hanjin 10000 TEU ContainerCon-Sister900152009-07-152010-01-202010-04-102010-07-01Firm
    66500566HMD2092Eletson 35K LPGLPG-Sister1320962010-08-272011-01-212011-03-242011-06-02Firm
    66500585STX1294SCI Panamax TankerTanker-Sister600402009-10-302010-03-312010-05-192010-07-26Firm
    66500730H-SAMHO395ZIM Container 10000 TEUCon-Sister1243642011/09/262012/01/162012/03/312012/06/20Potential Canceled
    66500587STX1296SCI Panamax TankerTanker-Sister600402009-12-042010-04-222010-06-102010-08-20Firm
    66500588STX1297SCI Panamax TankerTanker-Sister600402009-11-252010-05-042010-06-222010-08-31Firm
    66500612DSME5328TMT 320k TankerTanker-Sister13901132010-07-262010-12-132011-02-192011-04-05Firm
    66500651HMD2142ST Shipping 47k PC/ChemTanker-Sister827912009-12-142010-06-032010-08-072010-10-06Firm
    66500658SHI1759Andromeda 114K Aframax TankerTanker-Lead13009302009-04-272010-04-122010-07-012010-09-27Firm
    66500659SHI1760Andromeda 114K Aframax TankerTanker-Sister12301002009-10-012010-05-242010-08-182010-11-17Firm
    66500675HMD2149CP Offen 52k TankerTanker-Sister7101072010-06-232010-11-032010-12-282011-03-14Firm
    66500741DSME5331TMT 317k VLCC TankerTanker-Sister1390682010-09-272011-01-172011-03-262011-05-11Firm
    66500677HMD2151CP Offen 52k TankerTanker-Sister7101072010-12-312011-05-062011-07-052011-09-08Firm
    66500678HMD2152CP Offen 52k TankerTanker-Sister7101072011-03-282011-07-282011-10-062011-12-08Firm
    66500680HHI2066TMT 317k TankerTanker-Sister1271612009-08-242009-12-212010-05-072010-07-06Firm
    66500681HHI2067TMT 317k TankerTanker-Sister1271612009-09-212010-01-182010-05-072010-07-20Firm
    66500682HHI2068TMT 317k TankerTanker-Sister1271612009-11-232010-03-222010-07-022010-09-13Firm
    Sheet2
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66503012DSME5354Almi Tanker 158K Suezmax TankerTanker-Lead130015702011-03-092011-07-112011-10-082011-11-14Firm
    66500612DSME5328TMT 320k TankerTanker-Sister13901132010-07-262010-12-132011-02-192011-04-05Firm
    66500741DSME5331TMT 317k VLCC TankerTanker-Sister1390682010-09-272011-01-172011-03-262011-05-11Firm
    Sheet3
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500680HHI2066TMT 317k TankerTanker-Sister1271612009-08-242009-12-212010-05-072010-07-06Firm
    66500681HHI2067TMT 317k TankerTanker-Sister1271612009-09-212010-01-182010-05-072010-07-20Firm
    66500682HHI2068TMT 317k TankerTanker-Sister1271612009-11-232010-03-222010-07-022010-09-13Firm
    Sheet4
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500543HMD2091Eletson 52k TankerTanker-Sister6551392009-11-032010-04-052010-06-012010-07-31Firm
    66500566HMD2092Eletson 35K LPGLPG-Sister1320962010-08-272011-01-212011-03-242011-06-02Firm
    66500651HMD2142ST Shipping 47k PC/ChemTanker-Sister827912009-12-142010-06-032010-08-072010-10-06Firm
    66500675HMD2149CP Offen 52k TankerTanker-Sister7101072010-06-232010-11-032010-12-282011-03-14Firm
    66500677HMD2151CP Offen 52k TankerTanker-Sister7101072010-12-312011-05-062011-07-052011-09-08Firm
    66500678HMD2152CP Offen 52k TankerTanker-Sister7101072011-03-282011-07-282011-10-062011-12-08Firm
    Sheet5
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500544H-SAMHO355ZIM Container 10000 TEUCon-Lead145011082011/04/182011/08/162011/10/292012/01/04Potential Canceled
    66500730H-SAMHO395ZIM Container 10000 TEUCon-Sister1243642011/09/262012/01/162012/03/312012/06/20Potential Canceled
    Sheet6
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500558SHI1736Hanjin 10000 TEU ContainerCon-Sister900152009-07-152010-01-202010-04-102010-07-01Firm
    66500658SHI1759Andromeda 114K Aframax TankerTanker-Lead13009302009-04-272010-04-122010-07-012010-09-27Firm
    66500659SHI1760Andromeda 114K Aframax TankerTanker-Sister12301002009-10-012010-05-242010-08-182010-11-17Firm
    Sheet7
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500468STX2039Primosk 51k DWT TankerTanker-Sister690862010-04-202010-11-112010-12-092011-02-15Potential Canceled
    66500553STX1266Primosk 51k DWT TankerTanker-Lead690862010-05-152010-09-132010-12-092011-02-09Potential Canceled
    66500585STX1294SCI Panamax TankerTanker-Sister600402009-10-302010-03-312010-05-192010-07-26Firm
    66500587STX1296SCI Panamax TankerTanker-Sister600402009-12-042010-04-222010-06-102010-08-20Firm
    66500588STX1297SCI Panamax TankerTanker-Sister600402009-11-252010-05-042010-06-222010-08-31Firm

  2. #2
    Board Regular
    Join Date
    Mar 2010
    Posts
    144

    Default Re: Extract multiple rows matching criteria

    Quote Originally Posted by lechev65 View Post
    Hi,

    I have raw data in Sheet1. The criteria is "Yard Name". I need to extract the respective rows for each yard in a different sheet as shown here below. I would like to apply array formula. I use Exel 2003. Please for your help.

    Sheet1
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66503012DSME5354Almi Tanker 158K Suezmax TankerTanker-Lead130015702011-03-092011-07-112011-10-082011-11-14Firm
    66500468STX2039Primosk 51k DWT TankerTanker-Sister690862010-04-202010-11-112010-12-092011-02-15Potential Canceled
    66500543HMD2091Eletson 52k TankerTanker-Sister6551392009-11-032010-04-052010-06-012010-07-31Firm
    66500544H-SAMHO355ZIM Container 10000 TEUCon-Lead145011082011/04/182011/08/162011/10/292012/01/04Potential Canceled
    66500553STX1266Primosk 51k DWT TankerTanker-Lead690862010-05-152010-09-132010-12-092011-02-09Potential Canceled
    66500558SHI1736Hanjin 10000 TEU ContainerCon-Sister900152009-07-152010-01-202010-04-102010-07-01Firm
    66500566HMD2092Eletson 35K LPGLPG-Sister1320962010-08-272011-01-212011-03-242011-06-02Firm
    66500585STX1294SCI Panamax TankerTanker-Sister600402009-10-302010-03-312010-05-192010-07-26Firm
    66500730H-SAMHO395ZIM Container 10000 TEUCon-Sister1243642011/09/262012/01/162012/03/312012/06/20Potential Canceled
    66500587STX1296SCI Panamax TankerTanker-Sister600402009-12-042010-04-222010-06-102010-08-20Firm
    66500588STX1297SCI Panamax TankerTanker-Sister600402009-11-252010-05-042010-06-222010-08-31Firm
    66500612DSME5328TMT 320k TankerTanker-Sister13901132010-07-262010-12-132011-02-192011-04-05Firm
    66500651HMD2142ST Shipping 47k PC/ChemTanker-Sister827912009-12-142010-06-032010-08-072010-10-06Firm
    66500658SHI1759Andromeda 114K Aframax TankerTanker-Lead13009302009-04-272010-04-122010-07-012010-09-27Firm
    66500659SHI1760Andromeda 114K Aframax TankerTanker-Sister12301002009-10-012010-05-242010-08-182010-11-17Firm
    66500675HMD2149CP Offen 52k TankerTanker-Sister7101072010-06-232010-11-032010-12-282011-03-14Firm
    66500741DSME5331TMT 317k VLCC TankerTanker-Sister1390682010-09-272011-01-172011-03-262011-05-11Firm
    66500677HMD2151CP Offen 52k TankerTanker-Sister7101072010-12-312011-05-062011-07-052011-09-08Firm
    66500678HMD2152CP Offen 52k TankerTanker-Sister7101072011-03-282011-07-282011-10-062011-12-08Firm
    66500680HHI2066TMT 317k TankerTanker-Sister1271612009-08-242009-12-212010-05-072010-07-06Firm
    66500681HHI2067TMT 317k TankerTanker-Sister1271612009-09-212010-01-182010-05-072010-07-20Firm
    66500682HHI2068TMT 317k TankerTanker-Sister1271612009-11-232010-03-222010-07-022010-09-13Firm
    Sheet2
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66503012DSME5354Almi Tanker 158K Suezmax TankerTanker-Lead130015702011-03-092011-07-112011-10-082011-11-14Firm
    66500612DSME5328TMT 320k TankerTanker-Sister13901132010-07-262010-12-132011-02-192011-04-05Firm
    66500741DSME5331TMT 317k VLCC TankerTanker-Sister1390682010-09-272011-01-172011-03-262011-05-11Firm
    Sheet3
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500680HHI2066TMT 317k TankerTanker-Sister1271612009-08-242009-12-212010-05-072010-07-06Firm
    66500681HHI2067TMT 317k TankerTanker-Sister1271612009-09-212010-01-182010-05-072010-07-20Firm
    66500682HHI2068TMT 317k TankerTanker-Sister1271612009-11-232010-03-222010-07-022010-09-13Firm
    Sheet4
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500543HMD2091Eletson 52k TankerTanker-Sister6551392009-11-032010-04-052010-06-012010-07-31Firm
    66500566HMD2092Eletson 35K LPGLPG-Sister1320962010-08-272011-01-212011-03-242011-06-02Firm
    66500651HMD2142ST Shipping 47k PC/ChemTanker-Sister827912009-12-142010-06-032010-08-072010-10-06Firm
    66500675HMD2149CP Offen 52k TankerTanker-Sister7101072010-06-232010-11-032010-12-282011-03-14Firm
    66500677HMD2151CP Offen 52k TankerTanker-Sister7101072010-12-312011-05-062011-07-052011-09-08Firm
    66500678HMD2152CP Offen 52k TankerTanker-Sister7101072011-03-282011-07-282011-10-062011-12-08Firm
    Sheet5
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500544H-SAMHO355ZIM Container 10000 TEUCon-Lead145011082011/04/182011/08/162011/10/292012/01/04Potential Canceled
    66500730H-SAMHO395ZIM Container 10000 TEUCon-Sister1243642011/09/262012/01/162012/03/312012/06/20Potential Canceled
    Sheet6
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500558SHI1736Hanjin 10000 TEU ContainerCon-Sister900152009-07-152010-01-202010-04-102010-07-01Firm
    66500658SHI1759Andromeda 114K Aframax TankerTanker-Lead13009302009-04-272010-04-122010-07-012010-09-27Firm
    66500659SHI1760Andromeda 114K Aframax TankerTanker-Sister12301002009-10-012010-05-242010-08-182010-11-17Firm
    Sheet7
    Contract No.Yard NameHull No.Project DetailsShip TypeBudget Hours SITEBudget Hours DSOSteel CutKeel LayLaunchDeliveryStatus
    66500468STX2039Primosk 51k DWT TankerTanker-Sister690862010-04-202010-11-112010-12-092011-02-15Potential Canceled
    66500553STX1266Primosk 51k DWT TankerTanker-Lead690862010-05-152010-09-132010-12-092011-02-09Potential Canceled
    66500585STX1294SCI Panamax TankerTanker-Sister600402009-10-302010-03-312010-05-192010-07-26Firm
    66500587STX1296SCI Panamax TankerTanker-Sister600402009-12-042010-04-222010-06-102010-08-20Firm
    66500588STX1297SCI Panamax TankerTanker-Sister600402009-11-252010-05-042010-06-222010-08-31Firm
    thanks in advance!!!

  3. #3
    New Member
    Join Date
    Jun 2010
    Posts
    13

    Default Re: Extract multiple rows matching criteria

    HI,
    Will these be on the same worksheet, or spread out on different ones?

  4. #4
    MrExcel MVP
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    13,971

    Default Re: Extract multiple rows matching criteria

    Here's a macro, which uses the 'Advanced Filter' to copy the data for each yard to their respective worksheet. Since it's easier to copy the data to a worksheet that is named after the yard, instead of Sheet2, Sheet3, etc., and since I assume that this would be preferred, the macro first checks if a worksheet named after the yard (STX, HMD, etc.) exists before copying the data its worksheet. If not, it creates one, names it after the yard, and then copies the data to this newly created worksheet.

    Code:
    Option Explicit
    
    Sub test()
    
    '   Delclare the variables
        Dim WS1 As Worksheet, ws As Worksheet
        Dim DataRange As Range, CritRange As Range
        Dim LastRow As Long, LastCol As Long
        Dim i As Long, FinalRow As Long
        Dim YardName As String
        
    '   Turn off screen updating
        Application.ScreenUpdating = False
        
    '   Assign Sheet1 to an object variable
        Set WS1 = Worksheets("Sheet1")
        
        With WS1
        
    '       Determine the last row and column
            With .UsedRange
                LastRow = .Rows.Count + .Rows(1).Row - 1
                LastCol = .Columns.Count + .Columns(1).Column - 1
            End With
            
    '       Define the range for the source data
            Set DataRange = .Range(.Cells(1, 1), .Cells(LastRow, LastCol))
            
    '       Set up the range for the unique list of names
            .Cells(1, LastCol + 2).Value = .Cells(1, 2).Value
            
    '       Filter for a unique list of names
            DataRange.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Cells(1, LastCol + 2), Unique:=True
            
    '       Define the last row in the unique list of names
            FinalRow = .Cells(.Rows.Count, LastCol + 2).End(xlUp).Row
            
    '       Set up the criteria range for the filter
            .Cells(1, LastCol + 4).Value = .Cells(1, "B").Value
            Set CritRange = .Cells(1, LastCol + 4).Resize(2, 1)
            
    '       Filter for each name and copy to their respective worksheets
            For i = 2 To FinalRow
            
                YardName = .Cells(i, LastCol + 2).Value
                
    '           Set up the criteria
                .Cells(2, LastCol + 4).Value = YardName
                
    '           Create a new worksheet, if one doesn't already exist
                If Application.Evaluate("ISREF('" & YardName & "'!A1)") Then
                    Set ws = Worksheets(YardName)
                Else
                    Set ws = Worksheets.Add(after:=Worksheets(Worksheets.Count))
                    ws.Name = YardName
                End If
                
    '           Filter for the current name, and copy to its respective worksheet
                DataRange.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=CritRange, _
                    CopyToRange:=ws.Cells(1, 1), Unique:=False
                    
            Next i
                
    '       Clear out the unique list of names, and criteria range
            .Cells(1, LastCol + 2).Resize(, 3).EntireColumn.Clear
    
        End With
        
    '   Turn on screen updating
        Application.ScreenUpdating = True
        
    End Sub
    Domenic Tamburino
    Microsoft MVP - Excel
    xl-central.com - "For Your Microsoft Excel Solutions"

  5. #5
    Board Regular
    Join Date
    Mar 2010
    Posts
    144

    Default Re: Extract multiple rows matching criteria

    Quote Originally Posted by Martyn1986 View Post
    HI,
    Will these be on the same worksheet, or spread out on different ones?
    Hi Martyn,
    They will be on different worksheets named same as the yard names, i.e "DSME", "HHI", "HMD", "STX" etc.

  6. #6
    Board Regular
    Join Date
    Mar 2010
    Posts
    144

    Default Re: Extract multiple rows matching criteria

    Quote Originally Posted by Domenic View Post
    Here's a macro, which uses the 'Advanced Filter' to copy the data for each yard to their respective worksheet. Since it's easier to copy the data to a worksheet that is named after the yard, instead of Sheet2, Sheet3, etc., and since I assume that this would be preferred, the macro first checks if a worksheet named after the yard (STX, HMD, etc.) exists before copying the data its worksheet. If not, it creates one, names it after the yard, and then copies the data to this newly created worksheet.

    Code:
    Option Explicit
     
    Sub test()
     
    '   Delclare the variables
        Dim WS1 As Worksheet, ws As Worksheet
        Dim DataRange As Range, CritRange As Range
        Dim LastRow As Long, LastCol As Long
        Dim i As Long, FinalRow As Long
        Dim YardName As String
     
    '   Turn off screen updating
        Application.ScreenUpdating = False
     
    '   Assign Sheet1 to an object variable
        Set WS1 = Worksheets("Sheet1")
     
        With WS1
     
    '       Determine the last row and column
            With .UsedRange
                LastRow = .Rows.Count + .Rows(1).Row - 1
                LastCol = .Columns.Count + .Columns(1).Column - 1
            End With
     
    '       Define the range for the source data
            Set DataRange = .Range(.Cells(1, 1), .Cells(LastRow, LastCol))
     
    '       Set up the range for the unique list of names
            .Cells(1, LastCol + 2).Value = .Cells(1, 2).Value
     
    '       Filter for a unique list of names
            DataRange.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Cells(1, LastCol + 2), Unique:=True
     
    '       Define the last row in the unique list of names
            FinalRow = .Cells(.Rows.Count, LastCol + 2).End(xlUp).Row
     
    '       Set up the criteria range for the filter
            .Cells(1, LastCol + 4).Value = .Cells(1, "B").Value
            Set CritRange = .Cells(1, LastCol + 4).Resize(2, 1)
     
    '       Filter for each name and copy to their respective worksheets
            For i = 2 To FinalRow
     
                YardName = .Cells(i, LastCol + 2).Value
     
    '           Set up the criteria
                .Cells(2, LastCol + 4).Value = YardName
     
    '           Create a new worksheet, if one doesn't already exist
                If Application.Evaluate("ISREF('" & YardName & "'!A1)") Then
                    Set ws = Worksheets(YardName)
                Else
                    Set ws = Worksheets.Add(after:=Worksheets(Worksheets.Count))
                    ws.Name = YardName
                End If
     
    '           Filter for the current name, and copy to its respective worksheet
                DataRange.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=CritRange, _
                    CopyToRange:=ws.Cells(1, 1), Unique:=False
     
            Next i
     
    '       Clear out the unique list of names, and criteria range
            .Cells(1, LastCol + 2).Resize(, 3).EntireColumn.Clear
     
        End With
     
    '   Turn on screen updating
        Application.ScreenUpdating = True
     
    End Sub
    Hi Domenic,

    Thanks a lot for your prompt replay!

    As you supposed, the worksheets will be named same as the yards.
    But can I do it using array formula because the newly created worksheets will be used as a data base for calculation of Machinery and Hull Hours and there are many additional tables on the same worksheet getting data from the respective yard data base.
    I am not very good with the macros ...

    Hope you could help me on that

  7. #7
    MrExcel MVP
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    13,971

    Default Re: Extract multiple rows matching criteria

    Quote Originally Posted by lechev65 View Post
    Hi Domenic,

    Thanks a lot for your prompt replay!

    As you supposed, the worksheets will be named same as the yards.
    But can I do it using array formula because the newly created worksheets will be used as a data base for calculation of Machinery and Hull Hours and there are many additional tables on the same worksheet getting data from the respective yard data base.
    I am not very good with the macros ...

    Hope you could help me on that
    A combination of formulas, which includes an array formula, can be used. However, with these formulas being copied to many cells on many sheets, the calculations will be either extremely slow or bring Excel to a halt.

    An alternative formula approach might be to sort the source data by yard name, in ascending order, and then use non-array formulas to return the data to their respective worksheets. But, again, with these formulas being copied to many cells in many sheets, the calculations might still be somewhat slow.

    I'd suggest trying the macro. With a few clicks of the mouse, your done. If you're not sure how to implement it, I can walk you through each step.

    Which method would you like to pursue?

    (By the way, with regards to the formula approach, there would be no need to enter the formulas for each sheet separately. They can be entered in all worksheets, all in one shot.)
    Domenic Tamburino
    Microsoft MVP - Excel
    xl-central.com - "For Your Microsoft Excel Solutions"

  8. #8
    Board Regular
    Join Date
    Mar 2010
    Posts
    144

    Smile Re: Extract multiple rows matching criteria

    Quote Originally Posted by Domenic View Post
    A combination of formulas, which includes an array formula, can be used. However, with these formulas being copied to many cells on many sheets, the calculations will be either extremely slow or bring Excel to a halt.

    An alternative formula approach might be to sort the source data by yard name, in ascending order, and then use non-array formulas to return the data to their respective worksheets. But, again, with these formulas being copied to many cells in many sheets, the calculations might still be somewhat slow.

    I'd suggest trying the macro. With a few clicks of the mouse, your done. If you're not sure how to implement it, I can walk you through each step.

    Which method would you like to pursue?

    (By the way, with regards to the formula approach, there would be no need to enter the formulas for each sheet separately. They can be entered in all worksheets, all in one shot.)
    Domenic, I will listen to you and try the macros. Thanks for your kindness!

  9. #9
    Board Regular
    Join Date
    Mar 2010
    Posts
    144

    Default Re: Extract multiple rows matching criteria

    Quote Originally Posted by lechev65 View Post
    Domenic, I will listen to you and try the macros. Thanks for your kindness!
    Domenic, sorry for the stupid question but as I told you I am not good at all with the macros. I tried to record the macro above but it doesn't work and most probably because I do not know how to do it correctly ... I use a lot of excel stuff but always with formulas ... never macro

    Could you explain please in details how to record (assign) the macro. Please note that I am using Excel 2003 as it is our company policy ...

    Thanks in advance for your support and understanding !!!

    Krasimir

  10. #10
    MrExcel MVP
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    13,971

    Default Re: Extract multiple rows matching criteria

    Try the following...

    1) Open the source file.

    2) Launch the Visual Basic Editor by pressing Alt+F11

    3) Open the Project Explorer by pressing Ctrl+R

    4) In the Project Explorer, select/click on the project associated with the source workbook

    5) Insert a standard module by selecting on the menu Insert > Module

    6) Copy and paste the macro into the code window for the module

    7) Close and return to Excel by pressing Alt+Q

    8) Bring up the macro dialog box by pressing Alt+F8

    9) Select the macro named 'test', and click 'Run'
    Domenic Tamburino
    Microsoft MVP - Excel
    xl-central.com - "For Your Microsoft Excel Solutions"

Page 1 of 6 123 ... LastLast

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com