簡體   English   中英

VBA代碼基於行ID循環行並將值復制到列中

[英]VBA code to loop rows based on Row ID and copy values into columns

我有來自調查設備的原始現場數據文本文件,我想在新工作表的摘要表中排列; 我已經創建了一個代碼來導入多個文本文件,方法是將每個文件附加到一個表中,但是原始數據文件包含的摘要中不需要太多行。 在每個文本文件中輸出大約1000行,我的摘要表只需要16行。 數據是根據每個測試編號排列的,因此“第2列”中的“ROWID”對於報告的指標是相同的。 我想幫助創建宏來循環原始數據表,基於'第1列'作為'TestID','第2列'作為'ROWID',然后將'第4列'中的值復制到摘要表,下面的示例,任何幫助或者提出問題。 謝謝

以下示例數據;

Ontario2    5100    FILE NAME & SYSTEM MODEL              : Ontario2.sks  1295 PAVEMENT FRICTION TESTER (UNIVERSAL)     
Ontario2    5101    SOFTWARE VERSION                      : 1.0.6506.22298      
Ontario2    5101A   VCU SOFTWARE VERSION                 : 8000908.601.007a     
Ontario2    5102    TIME                       (hh:mm:ss) : 11:44:13        
Ontario2    5103    DATE                     (mm/dd/yyyy) : 01/22/2019      
Ontario2    0   =================================================================       
Ontario2    0    Test Summary Values                 Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    5000     Test Number                        1    
Ontario2    5001     Route                                               
Ontario2    5002     Direction                                           
Ontario2    5003     Lane                                                
Ontario2    5004     Event                                               
Ontario2    5005     Test Start DMI                     0    ft
Ontario2    5006     Test Start Time (Hr)               11   hr
Ontario2    5007     Test Start Time (Min)              40   minute
Ontario2    5008     Test Wheel                          Left            
Ontario2    5009     Test Wet/Dry                        WET             
Ontario2    5010     Latitude                            034.0564687° N  
Ontario2    5011     Longitude                           084.3002236° W  
Ontario2    5012     Bearing                            179.9    degrees
Ontario2    6000     Air Temperature                    -3.5     f
Ontario2    6001     Surface Temperature                55.6     f
Ontario2    6002     Left Tire Temperature               not installed   f
Ontario2    6003     Left Nozzle Water Temperature      0    f
Ontario2    6004     Right Tire Temperature              not installed   f
Ontario2    6005     Right Nozzle Water Temperature      not installed   f
Ontario2    6006     Tank 1 Water Temperature           0    f
Ontario2    6007     Tank 2 Water Temperature            not installed   f
Ontario2    6008     Tank 1 Water Level                 325.9    gal
Ontario2    6009     Tank 2 Water Level                  not installed   gal
Ontario2    6010     Data Filter                        5    points
Ontario2    6011     Water Depth                        0.5  mm
Ontario2    6012     Sampling Rate                      100  hz
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Right Wheel Peak Values             Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6020     Right Traction Force               0    lb
Ontario2    6021     Right Load Force                   0    lb
Ontario2    6022     Right Vehicle Speed                0    mph
Ontario2    6023     Right Test Wheel Speed             0    mph
Ontario2    6024     Right SN                           0    friction
Ontario2    6025     Right Percent Slip                 0    percent
Ontario2    6026     Right Time to Peak Brake Coef      0    seconds
Ontario2    6027     Right Time to Wheel Lockup         0    seconds
Ontario2    6028     Right Flow Rate                    0    gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Left Wheel Peak Values              Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6040     Left  Traction Force               1029.24  lb
Ontario2    6041     Left  Load Force                   949.52   lb
Ontario2    6042     Left  Vehicle Speed                37.5     mph
Ontario2    6043     Left  Test Wheel Speed             33.1     mph
Ontario2    6044     Left  SN                           108.4    friction
Ontario2    6045     Left  Percent Slip                 11.6     percent
Ontario2    6046     Left  Time to Peak Brake Coef      1.13     seconds
Ontario2    6047     Left  Time to Wheel Lockup         1.37     seconds
Ontario2    6048     Left  Flow Rate                    0    gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Right Wheel SN Values               Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6060     Right SN Average                   0    friction
Ontario2    6061     Right SN Minimum                   0    friction
Ontario2    6062     Right SN Maximum                   0    friction
Ontario2    6063     Right SN Standard Deviation        0    friction
Ontario2    6064     Right SN Speed Average             0    mph
Ontario2    6065     Right SN Flow Average              0    gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Left Wheel SN Values                Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6080     Left  SN Average                   84.2     friction
Ontario2    6081     Left  SN Minimum                   78.3     friction
Ontario2    6082     Left  SN Maximum                   89.4     friction
Ontario2    6083     Left  SN Standard Deviation        2.7  friction
Ontario2    6084     Left  SN Speed Average             36.6     mph
Ontario2    6085     Left  SN Flow Average              0    gpm
Ontario2    0   =================================================================       
Ontario2    XXXX    ^^^^ Speed ^^^^     
Ontario2    0   =================================================================       
Ontario2    0    Test Summary Values                 Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    5000     Test Number                        2    
Ontario2    5001     Route                                               
Ontario2    5002     Direction                                           
Ontario2    5003     Lane                                                
Ontario2    5004     Event                                               
Ontario2    5005     Test Start DMI                     29.36    ft
Ontario2    5006     Test Start Time (Hr)               11   hr
Ontario2    5007     Test Start Time (Min)              41   minute
Ontario2    5008     Test Wheel                          Left            
Ontario2    5009     Test Wet/Dry                        WET             
Ontario2    5010     Latitude                            034.0511896° N  
Ontario2    5011     Longitude                           084.3033369° W  
Ontario2    5012     Bearing                            201.9    degrees
Ontario2    6000     Air Temperature                    -1.6     f
Ontario2    6001     Surface Temperature                49.9     f
Ontario2    6002     Left Tire Temperature               not installed   f
Ontario2    6003     Left Nozzle Water Temperature      0    f
Ontario2    6004     Right Tire Temperature              not installed   f
Ontario2    6005     Right Nozzle Water Temperature      not installed   f
Ontario2    6006     Tank 1 Water Temperature           0    f
Ontario2    6007     Tank 2 Water Temperature            not installed   f
Ontario2    6008     Tank 1 Water Level                 353.3    gal
Ontario2    6009     Tank 2 Water Level                  not installed   gal
Ontario2    6010     Data Filter                        5    points
Ontario2    6011     Water Depth                        0.5  mm
Ontario2    6012     Sampling Rate                      100  hz
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Right Wheel Peak Values             Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6020     Right Traction Force               0    lb
Ontario2    6021     Right Load Force                   0    lb
Ontario2    6022     Right Vehicle Speed                0    mph
Ontario2    6023     Right Test Wheel Speed             0    mph
Ontario2    6024     Right SN                           0    friction
Ontario2    6025     Right Percent Slip                 0    percent
Ontario2    6026     Right Time to Peak Brake Coef      0    seconds
Ontario2    6027     Right Time to Wheel Lockup         0    seconds
Ontario2    6028     Right Flow Rate                    0    gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Left Wheel Peak Values              Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6040     Left  Traction Force               880.6    lb
Ontario2    6041     Left  Load Force                   959.17   lb
Ontario2    6042     Left  Vehicle Speed                40.5     mph
Ontario2    6043     Left  Test Wheel Speed             36   mph
Ontario2    6044     Left  SN                           91.81    friction
Ontario2    6045     Left  Percent Slip                 11.2     percent
Ontario2    6046     Left  Time to Peak Brake Coef      0.62     seconds
Ontario2    6047     Left  Time to Wheel Lockup         0.76     seconds
Ontario2    6048     Left  Flow Rate                    29.1     gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Right Wheel SN Values               Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6060     Right SN Average                   0    friction
Ontario2    6061     Right SN Minimum                   0    friction
Ontario2    6062     Right SN Maximum                   0    friction
Ontario2    6063     Right SN Standard Deviation        0    friction
Ontario2    6064     Right SN Speed Average             0    mph
Ontario2    6065     Right SN Flow Average              0    gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Left Wheel SN Values                Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6080     Left  SN Average                   53.4     friction
Ontario2    6081     Left  SN Minimum                   51.5     friction
Ontario2    6082     Left  SN Maximum                   55.5     friction
Ontario2    6083     Left  SN Standard Deviation        0.9  friction
Ontario2    6084     Left  SN Speed Average             40   mph
Ontario2    6085     Left  SN Flow Average              28.8     gpm
Ontario2    0   =================================================================       
Ontario2    0   =================================================================       
Ontario2    0    Test Summary Values                 Value           Units
Ontario2    0   -----------------------------------------------------------------       

Ontario2    5000     Test Number                        12   
Ontario2    5001     Route                                               
Ontario2    5002     Direction                                           
Ontario2    5003     Lane                                                
Ontario2    5004     Event                                               
Ontario2    5005     Test Start DMI                     8053.43  ft
Ontario2    5006     Test Start Time (Hr)               11   hr
Ontario2    5007     Test Start Time (Min)              44   minute
Ontario2    5008     Test Wheel                          Left            
Ontario2    5009     Test Wet/Dry                        WET             
Ontario2    5010     Latitude                            034.0483463° N  
Ontario2    5011     Longitude                           084.3183640° W  
Ontario2    5012     Bearing                            41.7     degrees
Ontario2    6000     Air Temperature                    -1.6     f
Ontario2    6001     Surface Temperature                47.6     f
Ontario2    6002     Left Tire Temperature               not installed   f
Ontario2    6003     Left Nozzle Water Temperature      0    f
Ontario2    6004     Right Tire Temperature              not installed   f
Ontario2    6005     Right Nozzle Water Temperature      not installed   f
Ontario2    6006     Tank 1 Water Temperature           0    f
Ontario2    6007     Tank 2 Water Temperature            not installed   f
Ontario2    6008     Tank 1 Water Level                 326  gal
Ontario2    6009     Tank 2 Water Level                  not installed   gal
Ontario2    6010     Data Filter                        5    points
Ontario2    6011     Water Depth                        0.5  mm
Ontario2    6012     Sampling Rate                      100  hz
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Right Wheel Peak Values             Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6020     Right Traction Force               0    lb
Ontario2    6021     Right Load Force                   0    lb
Ontario2    6022     Right Vehicle Speed                0    mph
Ontario2    6023     Right Test Wheel Speed             0    mph
Ontario2    6024     Right SN                           0    friction
Ontario2    6025     Right Percent Slip                 0    percent
Ontario2    6026     Right Time to Peak Brake Coef      0    seconds
Ontario2    6027     Right Time to Wheel Lockup         0    seconds
Ontario2    6028     Right Flow Rate                    0    gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Left Wheel Peak Values              Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6040     Left  Traction Force               825.19   lb
Ontario2    6041     Left  Load Force                   946.42   lb
Ontario2    6042     Left  Vehicle Speed                40.6     mph
Ontario2    6043     Left  Test Wheel Speed             37.2     mph
Ontario2    6044     Left  SN                           87.19    friction
Ontario2    6045     Left  Percent Slip                 8.6  percent
Ontario2    6046     Left  Time to Peak Brake Coef      0.59     seconds
Ontario2    6047     Left  Time to Wheel Lockup         0.71     seconds
Ontario2    6048     Left  Flow Rate                    29.3     gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Right Wheel SN Values               Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6060     Right SN Average                   0    friction
Ontario2    6061     Right SN Minimum                   0    friction
Ontario2    6062     Right SN Maximum                   0    friction
Ontario2    6063     Right SN Standard Deviation        0    friction
Ontario2    6064     Right SN Speed Average             0    mph
Ontario2    6065     Right SN Flow Average              0    gpm
Ontario2    0   -----------------------------------------------------------------       
Ontario2    0    Left Wheel SN Values                Value           Units
Ontario2    0   -----------------------------------------------------------------       
Ontario2    6080     Left  SN Average                   51.5     friction
Ontario2    6081     Left  SN Minimum                   47   friction
Ontario2    6082     Left  SN Maximum                   54.8     friction
Ontario2    6083     Left  SN Standard Deviation        1.8  friction
Ontario2    6084     Left  SN Speed Average             40.2     mph
Ontario2    6085     Left  SN Flow Average              28.9     gpm
Ontario2    0   =================================================================       
Ontario2    0   =================================================================       
Ontario3 - Copy (2) 5100    FILE NAME & SYSTEM MODEL              : Ontario3.sks  1295 PAVEMENT FRICTION TESTER (UNIVERSAL)     
Ontario3 - Copy (2) 5101    SOFTWARE VERSION                      : 1.0.6506.22298      
Ontario3 - Copy (2) 5101A   VCU SOFTWARE VERSION                 : 8000908.601.007a     
Ontario3 - Copy (2) 5102    TIME                       (hh:mm:ss) : 11:44:13        
Ontario3 - Copy (2) 5103    DATE                     (mm/dd/yyyy) : 01/22/2019      
Ontario3 - Copy (2) 0   =================================================================       
Ontario3 - Copy (2) 0    Test Summary Values                 Value           Units
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 5000     Test Number                        1    
Ontario3 - Copy (2) 5001     Route                                               
Ontario3 - Copy (2) 5002     Direction                                           
Ontario3 - Copy (2) 5003     Lane                                                
Ontario3 - Copy (2) 5004     Event                                               
Ontario3 - Copy (2) 5005     Test Start DMI                     0    ft
Ontario3 - Copy (2) 5006     Test Start Time (Hr)               11   hr
Ontario3 - Copy (2) 5007     Test Start Time (Min)              40   minute
Ontario3 - Copy (2) 5008     Test Wheel                          Left            
Ontario3 - Copy (2) 5009     Test Wet/Dry                        WET             
Ontario3 - Copy (2) 5010     Latitude                            034.0564687° N  
Ontario3 - Copy (2) 5011     Longitude                           084.3002236° W  
Ontario3 - Copy (2) 5012     Bearing                            179.9    degrees
Ontario3 - Copy (2) 6000     Air Temperature                    -3.5     f
Ontario3 - Copy (2) 6001     Surface Temperature                55.6     f
Ontario3 - Copy (2) 6002     Left Tire Temperature               not installed   f
Ontario3 - Copy (2) 6003     Left Nozzle Water Temperature      0    f
Ontario3 - Copy (2) 6004     Right Tire Temperature              not installed   f
Ontario3 - Copy (2) 6005     Right Nozzle Water Temperature      not installed   f
Ontario3 - Copy (2) 6006     Tank 1 Water Temperature           0    f
Ontario3 - Copy (2) 6007     Tank 2 Water Temperature            not installed   f
Ontario3 - Copy (2) 6008     Tank 1 Water Level                 325.9    gal
Ontario3 - Copy (2) 6009     Tank 2 Water Level                  not installed   gal
Ontario3 - Copy (2) 6010     Data Filter                        5    points
Ontario3 - Copy (2) 6011     Water Depth                        0.5  mm
Ontario3 - Copy (2) 6012     Sampling Rate                      100  hz
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 0    Right Wheel Peak Values             Value           Units
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 6020     Right Traction Force               0    lb
Ontario3 - Copy (2) 6021     Right Load Force                   0    lb
Ontario3 - Copy (2) 6022     Right Vehicle Speed                0    mph
Ontario3 - Copy (2) 6023     Right Test Wheel Speed             0    mph
Ontario3 - Copy (2) 6024     Right SN                           0    friction
Ontario3 - Copy (2) 6025     Right Percent Slip                 0    percent
Ontario3 - Copy (2) 6026     Right Time to Peak Brake Coef      0    seconds
Ontario3 - Copy (2) 6027     Right Time to Wheel Lockup         0    seconds
Ontario3 - Copy (2) 6028     Right Flow Rate                    0    gpm
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 0    Left Wheel Peak Values              Value           Units
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 6040     Left  Traction Force               1029.24  lb
Ontario3 - Copy (2) 6041     Left  Load Force                   949.52   lb
Ontario3 - Copy (2) 6042     Left  Vehicle Speed                37.5     mph
Ontario3 - Copy (2) 6043     Left  Test Wheel Speed             33.1     mph
Ontario3 - Copy (2) 6044     Left  SN                           108.4    friction
Ontario3 - Copy (2) 6045     Left  Percent Slip                 11.6     percent
Ontario3 - Copy (2) 6046     Left  Time to Peak Brake Coef      1.13     seconds
Ontario3 - Copy (2) 6047     Left  Time to Wheel Lockup         1.37     seconds
Ontario3 - Copy (2) 6048     Left  Flow Rate                    0    gpm
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 0    Right Wheel SN Values               Value           Units
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 6060     Right SN Average                   0    friction
Ontario3 - Copy (2) 6061     Right SN Minimum                   0    friction
Ontario3 - Copy (2) 6062     Right SN Maximum                   0    friction
Ontario3 - Copy (2) 6063     Right SN Standard Deviation        0    friction
Ontario3 - Copy (2) 6064     Right SN Speed Average             0    mph
Ontario3 - Copy (2) 6065     Right SN Flow Average              0    gpm
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 0    Left Wheel SN Values                Value           Units
Ontario3 - Copy (2) 0   -----------------------------------------------------------------       
Ontario3 - Copy (2) 6080     Left  SN Average                   84.2     friction
Ontario3 - Copy (2) 6081     Left  SN Minimum                   78.3     friction
Ontario3 - Copy (2) 6082     Left  SN Maximum                   89.4     friction
Ontario3 - Copy (2) 6083     Left  SN Standard Deviation        2.7  friction
Ontario3 - Copy (2) 6084     Left  SN Speed Average             36.6     mph
Ontario3 - Copy (2) 6085     Left  SN Flow Average              0    gpm
Ontario3 - Copy (2) 0   =================================================================       
Ontario3 - Copy (2) XXXX    ^^^^ Speed ^^^^     
Ontario3 - Copy (2) 0   =================================================================       
Ontario3 - Copy (2) 0    Test Summary Values                 Value           Units
Ontario3 - Copy (2) 0   -----------------------------------------------------

預期輸出匯總表;

Test_ID Test    Distance    Time    Wheel   WetDry  Speed   AvgFN   MinFN   MaxFN   StDevFN Temp    GPS_Lat GPS_Long    Notes   TestDate
Ontario2    1   0   11:40    Left            WET            36.6    84.2    78.3    89.4    2.7 55.6     034.0564687° N  084.3002236° W     1/22/2019
Ontario2    2   29.36   11:41    Left            WET            40  53.4    51.5    55.5    0.9 49.9     034.0511896° N  084.3033369° W     1/22/2019

這是一個用於此目的的骨架代碼,可以根據您的要求進行修改。 將輸入文本文件視為具有多個空格的固定寬度。 測試提供的樣本數據。 為簡單起見,修改了輸出表結構,如下所示。

在此輸入圖像描述

代碼直接處理文本文件

Sub test()
Dim Fno As Integer, Ln As String, Arr As Variant
Dim TestNo As String, TestID As String, Wheel As String
Dim Rw As Long
Dim Ws As Worksheet
Dim MyFile As Variant

Set Ws = ThisWorkbook.ActiveSheet

With Application.FileDialog(msoFileDialogFilePicker)
   .AllowMultiSelect = True
   .Filters.Add "Text", "*.Txt", 1

    If .Show <> -1 Then Exit Sub
    Rw = 6

    For Each MyFile In .SelectedItems
    Fno = FreeFile

    Open MyFile For Input As #Fno

    TestID = ""
    TestNo = ""
    Wheel = ""

        Do While Not EOF(Fno)    ' Loop until end of file.
        Line Input #Fno, Ln    ' Read line into variable.
        Ln = Trim(Ln)

        ' multiple spaces are converted to single space for splitting
            Do Until InStr(1, Ln, "  ") = 0
            Ln = Replace(Ln, "  ", " ")
            Arr = Split(Ln, " ")
            Loop

            If UBound(Arr) > 2 Then
                Select Case Arr(1)
                Case "5000"        'TestNo
                    If TestID <> Arr(0) Or TestNo <> Arr(UBound(Arr)) Then
                    Rw = Rw + 1
                    TestID = Arr(0)
                    TestNo = Arr(UBound(Arr))
                    Ws.Cells(Rw, 1).Value = TestID
                    Ws.Cells(Rw, 2).Value = TestNo
                    End If
                Case "5005"   'Distance
                Ws.Cells(Rw, 3).Value = Arr(UBound(Arr) - 1)
                Case "5006"   'Start Hr
                Ws.Cells(Rw, 4).Value = Arr(UBound(Arr) - 1)
                Case "5007"    'Start min
                Ws.Cells(Rw, 5).Value = Arr(UBound(Arr) - 1)
                Case "5008"    'Wheel
                Wheel = Arr(UBound(Arr))
                Ws.Cells(Rw, 6).Value = Arr(UBound(Arr))
                Case "5009"    'WetDry
                Ws.Cells(Rw, 7).Value = Arr(UBound(Arr))
                Case "5010"    'Lat
                Ws.Cells(Rw, 14).Value = Arr(UBound(Arr) - 1) & " " & Arr(UBound(Arr))
                Case "5011"    'Long
                Ws.Cells(Rw, 15).Value = Arr(UBound(Arr) - 1) & " " & Arr(UBound(Arr))
                Case "6001"    'Surface Temp
                Ws.Cells(Rw, 13).Value = Arr(UBound(Arr) - 1)
                End Select

                If Wheel = "Right" Then
                    Select Case Arr(1)
                    Case "6060"          'SN Average
                    Ws.Cells(Rw, 9).Value = Arr(UBound(Arr) - 1)
                    Case "6061"          'SN Min
                    Ws.Cells(Rw, 10).Value = Arr(UBound(Arr) - 1)
                    Case "6062"          'SN MAx
                    Ws.Cells(Rw, 11).Value = Arr(UBound(Arr) - 1)
                    Case "6063"          'SN St Dev
                    Ws.Cells(Rw, 12).Value = Arr(UBound(Arr) - 1)
                    Case "6064"          'Speed Avg
                    Ws.Cells(Rw, 8).Value = Arr(UBound(Arr) - 1)
                    End Select
                Else
                    Select Case Arr(1)
                    Case "6080"          'SN Average
                    Ws.Cells(Rw, 9).Value = Arr(UBound(Arr) - 1)
                    Case "6081"          'SN Min
                    Ws.Cells(Rw, 10).Value = Arr(UBound(Arr) - 1)
                    Case "6082"          'SN MAx
                    Ws.Cells(Rw, 11).Value = Arr(UBound(Arr) - 1)
                    Case "6083"          'SN St Dev
                    Ws.Cells(Rw, 12).Value = Arr(UBound(Arr) - 1)
                    Case "6084"          'Speed Avg
                    Ws.Cells(Rw, 8).Value = Arr(UBound(Arr) - 1)
                    End Select
            End If
            End If
        Loop
Close #Fno

Next MyFile

End With

End Sub

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM