+ Reply to Thread
Results 1 to 32 of 32

Multidimensional array

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    Multidimensional array

    I am stuck at the moment with this problem.

    I need to store 2 columns of data into an array Columns 8 and 9.

    I then need to find all matching data in column 8 ie (7X6605,7X6605)(there are 1000's of these combinations)

    With these matching strings i need to sort them by column9 which is time(30/12/1899 09:07:01) so that the erliest time is first.

    I Cant get my head round this problem does anyone know how it can be done.

    Bellow My attempt:
    Sub Serial()
     
    Dim Arr(9999)
    Dim i As Integer
    Dim N As Long
    Dim Arr2(9999)
    Dim i2 As Integer
    Dim N2 As Long
     
    N = 9999
    N2 = 9999
     
    For i = 1 To N
        Arr(i) = Sheet3.Cells(i, 8)
    Next i
     
        For i2 = 1 To N
            Arr(i2) = Sheet3.Cells(i2, 9)
        Next i2
     
     
     
     
    End Sub
    Thanx George
    Last edited by VBA Noob; 02-02-2009 at 08:38 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    re: Multidimensional array

    Can you post small example of the data
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    re: Multidimensional array

    I have worked out the solution a bit better with labled comments.

    This is where i have got to now

    Sub Serial()
    
    Dim Arr(9999)
    Dim i As Integer
    Dim N As Long
    Dim Arr2(9999)
    Dim i2 As Integer
    Dim N2 As Long
    Dim ArrCombine(2) As Variant
    Dim Sht As String
    Dim FTPSheet As String
    
    Sht = WorkingsOut
    N = 9999
    N2 = 9999
    
    For i = 1 To N
        Arr(i) = Sheet3.Cells(i, 8)
    Next i
    
        For i2 = 1 To N
            Arr2(i2) = Sheet3.Cells(i2, 9)
        Next i2
        
    ArrCombine(1) = Arr
    ArrCombine(2) = Arr2
    
    MsgBox ArrCombine(1)(2)
    MsgBox ArrCombine(2)(2)
    
    Worksheets.Add After:=Worksheets(Worksheets.Count)
                                ActiveSheet.Name = Sht
                                
                                'Find out how to add all same cerial numbers to sheet
                                'Add the matching time will be in same position in other array.
    
    'Sort sheet data by time
                                
    'Is is first row F = "** TEST PASSED**" test passed?
    
    'Store 0 no or 1 yes in sheet FTPSheet(Sheet3)
    
    
    
    
    End Sub

  4. #4
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    re: Multidimensional array

    Data example column 8 cerial num

    7X6605
    7X6605
    7X6621
    7X6628
    7X6628
    7X6628
    1Q1111
    1Q1111
    7X6406
    7X6406
    7X6406
    7X6407
    7X6416
    7X6450
    7X6450
    7X6453
    7X6453
    7X6474
    7X6474
    7X6476
    7X6477
    7X6479
    7X6479
    7X6479
    7X6481
    7X6482

    Column 9 Time

    30/12/1899 09:07:01
    30/12/1899 09:10:29
    30/12/1899 09:19:46
    30/12/1899 09:15:49
    30/12/1899 09:23:37
    30/12/1899 09:14:08
    30/12/1899 12:15:05
    30/12/1899 12:16:15
    30/12/1899 11:28:31
    30/12/1899 11:29:37
    30/12/1899 12:11:32
    30/12/1899 11:03:05
    30/12/1899 11:17:31
    30/12/1899 10:53:15
    30/12/1899 10:55:42
    30/12/1899 11:51:06
    30/12/1899 11:53:07
    30/12/1899 11:21:48
    30/12/1899 11:24:41
    30/12/1899 11:37:02
    30/12/1899 11:45:46
    30/12/1899 11:08:23
    30/12/1899 11:10:18
    30/12/1899 11:06:35
    30/12/1899 11:13:47
    30/12/1899 11:57:45

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    re: Multidimensional array

    I'm lost.

    Do you just want the contents of columns 8 and 9 in an array sorted by columns 8 and then 9?

  6. #6
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    re: Multidimensional array

    The arry is created already sorted by serial number as i sort the sheet then add the data to the array.

    i just need to somehow extract matching cerial numbers from the array into another sheet, then i can sort them by time on the created sheet.

  7. #7
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    re: Multidimensional array

    This is how i was trying to extract matching cerial numbers and enter them into a new sheet, it just says type miss match

  8. #8
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    re: Multidimensional array

    Worksheets.Add After:=Worksheets(Worksheets.Count)
    
                                ActiveSheet.Name = "WorkingsOut"
    Rw2 = Rw + 1
                                
    For ArrCombine(1) = 1 To 9999
        For Rw = 1 To 9999
            If ArrCombine(1)(Rw) = ArrCombine(1)(Rw2) Then
                Worksheets("WorkingsOut").Cells(1, 1) = ArrCombine(1)(Rw)
            End If
        Next Rw
    Next ArrCombine(1)

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    re: Multidimensional array

    Which line errors?

    What information is written out if the serial numbers match? First/last/all dates?

    Why not post a workbook of the sample data in a before and after state?

  10. #10
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    re: Multidimensional array

    Here is an example.

    Its so hard to explain the macro is simpler to understand

    George
    Attached Files Attached Files

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    re: Multidimensional array

    It's going to be pretty hard for anybody to help if you can not explain your problem

    Let's try understanding why you are using the array as the loop index variable?

    For ArrCombine(1) = 1 To 9999
    Should you not be using Rw2 or some other variable?

    Can you not use some formula and autofilter?

  12. #12
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    re: Multidimensional array

    If serial numbers match say
    MsgBox ArrCombine(1)(2)
    MsgBox ArrCombine(2)(2)
    MsgBox ArrCombine(3)(2)
    Shown above if the array index is 2 on all the column arrays they will all be in the same column

  13. #13
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    Re: Multidimensional array

    'Macro: Calculate first time pass rate % of PTR Test Rig
    'Author: G R Withey
    'Date: Sept-Jan 2008-2009
    
    Option Explicit
    'Checks if a worksheet exists
    Function wsExists(wksName As String) As Boolean
    
    On Error Resume Next
        wsExists = CBool(Len(Worksheets(wksName).Name) > 0)
        On Error GoTo 0                                             'After On Error check resume checking as normal
    End Function
    
    'Calculates sheet (3)
    Sub CalcDataSheet()
        Dim TotalRows As Long
        Dim C As Integer
        Dim HeadingArray
        Dim Ro As Long
            
        On Error Resume Next
                 
    With Application
            .DisplayAlerts = False                  'Smother operation improving speed
            .ScreenUpdating = False
            .Calculation = xlCalculationManual
             
                Application.Worksheets(3).Activate
                TotalRows = Cells(Rows.Count, 1).End(xlUp).Row   'Making total rows variable = total rows in worksheet
     
                With ThisWorkbook.Worksheets(3)
                    .Range(.Cells(2, 11), .Cells(TotalRows, 11)).FormulaR1C1 = "=IF(RC[-3]=0,0,IF(R[1]C[-3]=RC[-3],0,1))"
                    .Range(.Cells(2, 12), .Cells(TotalRows, 12)).FormulaR1C1 = "=IF(RC[-10]=""Production"",1,0)"
                    .Range(.Cells(2, 13), .Cells(TotalRows, 13)).FormulaR1C1 = "=IF(RC[-12]=""Verification"",1,0)"          'Perform Calculations
                    .Range(.Cells(2, 14), .Cells(TotalRows, 14)).FormulaR1C1 = "=IF(RC[-8]=""** TEST ABORTED **"",1,0)"
                    .Range(.Cells(2, 15), .Cells(TotalRows, 15)).FormulaR1C1 = "=IF(R[1]C[-14]=""Incomplete"",1,0)"
                    .Range(.Cells(2, 16), .Cells(TotalRows, 16)).FormulaR1C1 = "=IF(RC[-10]=""** TEST FAILED **"",1,0)"
                    .Range(.Cells(2, 17), .Cells(TotalRows, 17)).FormulaR1C1 = "=IF(RC[-11]=""** TEST PASSED **"",1,0)"
                    .Range(.Cells(2, 18), .Cells(TotalRows, 18)).FormulaR1C1 = "=RC[-7]*RC[-6]*RC[-1]"
                    .Range(.Cells(2, 19), .Cells(TotalRows, 19)).FormulaR1C1 = "=RC[-8]*RC[-7]*RC[-3]"
                End With
                    
            .DisplayAlerts = True
            .ScreenUpdating = True
            .Calculation = xlCalculationAutomatic
    End With
            If ThisWorkbook.Worksheets(3).Cells(1, 1) <> "Status" Then Rows("1:1").Select: Selection.Insert Shift:=xlDown   ' If status in A1 heading already exsists
    
                HeadingArray = Array("Status", "Test Type", "User ID", "Probe", "Date", "Text Note", "Failure Reason", _
                                 "Serial Number", "Start Time", "Rig Number", "First Test", "Production", "Verification", _
                                 "Test Aborted", "Test Incomplete", "Test Failed", "Test Passed", "FTF", "FTP")                 'Adding Header Row using Array
                
                ThisWorkbook.Worksheets(3).Cells(1, 1).Resize(1, 1 + UBound(HeadingArray)).Value = HeadingArray
        
                    ThisWorkbook.Worksheets(3).Cells.Select
                        Selection.Sort Key1:=Range("E1"), Order1:=xlAscending, _
                                                            Header:=xlGuess, _
                                                            OrderCustom:=1, _
                                                            MatchCase:=False, _
                                                            Orientation:=xlTopToBottom, _
                                                            DataOption1:=xlSortNormal
                                                            '^Sorting Dates into Acending order
            ThisWorkbook.Worksheets(1).Activate
        Call SortDataToMonths
        
    End Sub
    'Sorts data on sheet (3) "Data" into named month sheets
    Sub SortDataToMonths()
        Dim ShtData As Worksheet
        Dim Rng    As Range
        Dim Cl     As Range
        Dim Sht    As String
        
        On Error GoTo ErrorHandlingSortDataToMonths
        
            With Application
                .DisplayAlerts = False
                .ScreenUpdating = False             'Speed up operation(Chnaging settings)
                .Calculation = xlCalculationManual
      
                Set ShtData = Sheet3    ' make Sheet 3 an object
                
                    With ShtData
                        Set Rng = .Range(.Cells(2, 5), .Cells(.Rows.Count, 5).End(xlUp))   'defining the range (exsisting no of rows)
                        For Each Cl In Rng
                            If IsDate(Cl.Value) Then Sht = MonthName(Month(Cl.Value)) & "_" & (Year(Cl.Value)) 'If cell has_
                            If Not wsExists(Sht) Then                                                      '_Date Var sht = cell' value
                                Worksheets.Add After:=Worksheets(Worksheets.Count)
                                ActiveSheet.Name = Sht
                                'add header row                          'If ws doesnt exist add new sheet + name it the cells value
                                .Cells(1, 1).EntireRow.Copy Sheets(Sht).Cells(1, 1) 'Then add the row of data
                            End If
                            If Not IsEmpty(Cl) Then Cl.EntireRow.Copy Sheets(Sht).Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
                        Next Cl                                                 '^Otherwise if sheet exists copy row to the sheet
                        .Select 'check if cell is empty then select next cell
                    End With
                
                Worksheets(1).Select
    
                    .DisplayAlerts = True
                    .ScreenUpdating = True                  'Ending speed enhancing settings
                    .Calculation = xlCalculationAutomatic
            End With
                           
    ErrorHandlingSortDataToMonths:
        
    Dim ErrorSht    As Worksheet
    Dim Msg As String
        
        Select Case Err
            Case 1004: 'Data may not have been imported to data sheet
                Msg = "An Error Has Occured" & vbNewLine
                Msg = Msg & "Check that there is data in sheet 3 (Data) and retry"      'Error Message produced if sheet3 is empty
                MsgBox Msg
                
                For Each ErrorSht In ThisWorkbook.Worksheets
                    If ErrorSht.Index > 3 Then ErrorSht.Delete          'deletes any empty sheets created by the macro
                Next ErrorSht
                
                Worksheets(1).Select
            
            Exit Sub
        Case Else
    End Select
    
    Call AddFormulas
            
            
    End Sub

  14. #14
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    Re: Multidimensional array

    Follows last code

    'Generates tables on sheets 1+2. Formulas add up (1's+0's) from named month sheets to make a total for each month
    Sub AddFormulas()
    Dim MonthColumn As Long
    Dim Msg As String
    Dim Ws As Long
    Dim N As Long
    Dim Cnt As Integer
    
    'On Error GoTo ErrorHandlingAddForms
    
    With Application
            .ScreenUpdating = False
            .Calculation = xlCalculationManual
            
            
        N = Application.Worksheets.Count - 3
    
            For Ws = 1 To 2                        'Create tables on sheets 1 + 2.(Tables look up 1's and 0's from month sheets
                With Worksheets(Ws)
                    For MonthColumn = 1 To N
                        .Cells(4, MonthColumn + 1).Formula = "=MIN(" & Worksheets(MonthColumn + 3).Range("E:E").Address(External:=True) & ")"
                        .Cells(4, MonthColumn + 1).NumberFormat = "mmm-yy"
                        .Cells(5, MonthColumn + 1).Formula = "=MIN(" & Worksheets(MonthColumn + 3).Range("E:E").Address(External:=True) & ")"
                        .Cells(5, MonthColumn + 1).NumberFormat = "dd/mm/yy"
                        .Cells(6, MonthColumn + 1).Formula = "=MAX(" & Worksheets(MonthColumn + 3).Range("E:E").Address(External:=True) & ")"
                        .Cells(6, MonthColumn + 1).NumberFormat = "dd/mm/yy"
                        .Cells(7, MonthColumn + 1).Formula = "=COUNTIF(" & Worksheets(MonthColumn + 3).Range("B:B").Address(External:=True) & ", ""Production"")"
                        .Cells(8, MonthColumn + 1).Formula = "=COUNTIF(" & Worksheets(MonthColumn + 3).Range("K:K").Address(External:=True) & ", ""1"")"
                        .Cells(9, MonthColumn + 1).Formula = "=COUNTIF(" & Worksheets(MonthColumn + 3).Range("Q:Q").Address(External:=True) & ", ""1"")"
                        .Cells(10, MonthColumn + 1).Formula = "=COUNTIF(" & Worksheets(MonthColumn + 3).Range("P:P").Address(External:=True) & ", ""1"")"
                        .Cells(11, MonthColumn + 1).Formula = "=COUNTIF(" & Worksheets(MonthColumn + 3).Range("R:R").Address(External:=True) & ", ""1"")"
                        .Cells(12, MonthColumn + 1).Formula = "=" & .Cells(13, MonthColumn + 1).Address(False, False) & "+" & .Cells(14, MonthColumn + 1).Address(False, False) & "+" & .Cells(15, MonthColumn + 1).Address(False, False)
                        .Cells(13, MonthColumn + 1).Formula = "=COUNTIF(" & Worksheets(MonthColumn + 3).Range("M:M").Address(External:=True) & ", ""1"")"
                        .Cells(14, MonthColumn + 1).Formula = "=COUNTIF(" & Worksheets(MonthColumn + 3).Range("N:N").Address(External:=True) & ", ""1"")"
                        .Cells(15, MonthColumn + 1).Formula = "=COUNTIF(" & Worksheets(MonthColumn + 3).Range("O:O").Address(External:=True) & ", ""1"")"
                        .Cells(16, MonthColumn + 1).Formula = "=" & .Cells(11, MonthColumn + 1).Address(False, False) & "/" & .Cells(7, MonthColumn + 1).Address(False, False)
                        .Cells(16, MonthColumn + 1).NumberFormat = "0.00%"
                    Next MonthColumn
                End With
            Next Ws
      MonthColumn = MonthColumn + 1             'Setting column num to 1 after last, creating the "total" column Number
      Ws = 0
      Dim i As Long
      For Ws = 1 To 2
            With Worksheets(Ws)
                .Cells(4, MonthColumn) = "Total"
                    For i = 7 To 15
                        .Cells(i, MonthColumn).FormulaR1C1 = "=SUM(RC2:RC[-1])"     'Adding total Column Sheets 1 + 2
                    Next i
                .Cells(16, MonthColumn).FormulaR1C1 = "=AVERAGE(RC2:RC[-1])"
                Range("B4").CurrentRegion.Formula = Range("B4").CurrentRegion.Value
            End With
        Next Ws
        
        Worksheets(2).Select: Selection.Range("B4").CurrentRegion.Formula = Range("B4").CurrentRegion.Value
        Worksheets(1).Activate
        
         For Ws = 1 To 2
                With Worksheets(Ws)
                    For MonthColumn = 1 To N + 1
                        .Cells(4, MonthColumn + 1).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
                            For Cnt = 5 To 15
                                .Cells(Cnt, MonthColumn + 1).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin  'Formatting Tables
                            Next Cnt                                                                            'Sheets 1 + 2
                        .Cells(16, MonthColumn + 1).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
                    Next MonthColumn
                End With
            Next Ws
            
            For Ws = 1 To 2
                With Worksheets(Ws)
                    For MonthColumn = 1 To N + 1
                        .Cells(4, MonthColumn + 1).Interior.ColorIndex = 40    'Format colours for "date" and "%"rows of tables 1+2
                        .Cells(16, MonthColumn + 1).Interior.ColorIndex = 40
                    Next MonthColumn
                End With
            Next Ws
    
    
            .ScreenUpdating = True
            .Calculation = xlCalculationAutomatic
    End With
    
     
    ErrorHandlingAddForms:          ' Error message that will appear if an event occurs
        Select Case Err
            Case 1004 'Object Error
                    Msg = MsgBox("Ignor error if less than 12 months are being calculated. Otherwise check there are sheets from which to calculate the tables and retry.", , "Calculation Error!")
            Case 9 ' No data sheets to calulate from
                    MsgBox "Err"
                    ThisWorkbook.Save
               Exit Sub
            Case Else
        End Select
        
        Call ProbeName
            
    End Sub
    
    Sub ProbeName()
    
    Dim ProbeStr As String
    Dim R As Range
    Dim Cl As Range
    Dim Sht3 As Worksheet
    Dim Ws As Long
    
    ProbeStr = 0
    
        With Application.Worksheets(3).Activate
        
            Range("D2").Activate
            Set R = Range(ActiveCell, ActiveCell.End(xlDown))
            R.Select
                For Each Cl In R
                    If Cl.Value <> "Probe" Then ProbeStr = Cl.Value
                    If ProbeStr <> ActiveCell.Offset(1, 0).Value Then ProbeStr = "All Probe Types": Exit For
                        If ProbeStr = "All Probe Types" Then Application.Worksheets(1).Cells(3, 1) = ProbeStr
            Next Cl
            Application.CutCopyMode = False
        End With
    
    For Ws = 1 To 2
        With Worksheets(Ws)
            .Cells(3, 1) = ProbeStr
        End With
    Next Ws
    
    Application.Worksheets(1).Activate
    
    Call RigName
    
    End Sub
    
    Sub RigName()
    
    Dim RigStr As String
    Dim R As Range
    Dim Cl As Range
    Dim Sht3 As Worksheet
    Dim Ws As Long
    
    RigStr = 0
    
        With Application.Worksheets(3).Activate
        
            Range("J2").Activate
            Set R = Range(ActiveCell, ActiveCell.End(xlDown))
            R.Select
                For Each Cl In R
                    If Cl.Value <> "Probe" Then RigStr = Cl.Value
                    If RigStr <> ActiveCell.Offset(1, 0).Value Then RigStr = "All Rig Numbers": Exit For
                        If RigStr = "All Probe Types" Then Application.Worksheets(1).Cells(3, 2) = RigStr
            Next Cl
            Application.CutCopyMode = False
        End With
    
    For Ws = 1 To 2
        With Worksheets(Ws)
            .Cells(3, 2) = RigStr
        End With
    Next Ws
    
    
        Worksheets(1).Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
        Worksheets(2).Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    
    Application.Worksheets(1).Activate
    End Sub

  15. #15
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Multidimensional array

    This uses a slight variation on the formula to ignore Aborted tests.

    Sub x()
        Dim rngData As Range
        Dim lngRow As Long
        Dim rngCell As Range
        Dim shtFTP As Worksheet
        
        Set shtFTP = Worksheets("FTPSheet")
        
        Set rngData = Sheet3.Range("H2", Sheet3.Cells(Sheet3.Rows.Count, 8).End(xlUp)).Offset(0, 12)
        rngData.FormulaR1C1 = "=IF(COUNTIF(R2C8:R" & rngData.Rows.Count + 1 & "C8,RC[-12])>1," & _
                               "IF(ISERROR(SEARCH(""PASSED"",RC[-14])),0,1),"""")"
    
        lngRow = 2
        For Each rngCell In rngData.Cells
            If rngCell.Value = 1 Then
                rngCell.Offset(0, -12).Resize(1, 2).Copy shtFTP.Cells(lngRow, 1)
                lngRow = lngRow + 1
            End If
        Next
    
    End Sub

  16. #16
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    Re: Multidimensional array

    Thats nearly it.
    The sheet should only contain one serial number
    Sheet deleted to save memory
    sort by time and then put the passed result in a results sheet

  17. #17
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    Re: Multidimensional array

    is that all the tests that passed if so all i would need to do is count those and divde by total tests for fo FTP rate

  18. #18
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Multidimensional array

    Sorry but this just does not make sense.

    The sheet should only contain one serial number
    Sheet deleted to save memory
    sort by time and then put the passed result in a results sheet
    If the sheet only contains 1 serial number what is the point of sorting?
    And with only 1 number the memory overhead is hardly going to be large.

  19. #19
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    Re: Multidimensional array

    Dont worry about that i just didnt understand what had happened or what the sheet was showing

    What did the macro do

    And what results are left are they the sorted FTP because this will have solved the problem

    George

  20. #20
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Multidimensional array

    The macro uses formula in column T of sheet3 to flag occurances of multiple serial numbers that have a PASSED status.

    It then goes through column T and copies serial number and date to FTP sheet.

  21. #21
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    Re: Multidimensional array

    Thats great has it flagged and exported the single serial numbers as well bacause these count as first time pass as well

    George

  22. #22
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Multidimensional array

    Based on the example you provided the only 2 records it creates are

    7X6605 30/12/1899 09:10:29
    7X6628 30/12/1899 09:23:37


    These are not reported as they are single occurances
    7X6621
    7X6406

    This is not reported as it had not Passed.
    1Q1111

  23. #23
    Forum Contributor
    Join Date
    10-20-2008
    Location
    Gloucestershire
    Posts
    134

    Thumbs up Re: Multidimensional array

    Thats great.

    I have got the result i wanted just confused both of us as i was told to do it in a long winded way.

    Thanx alot for the help as you have dedicated a few hours to heling out

    George

  24. #24
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Multidimensional array

    No problem glad we got it sorted.
    Obviously you will need to check it on your real data set.

+ 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