1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Option Explicit
Public FrontRideHeightCZ
Public RearRideHeightCZ
Public CZ
Public Sub CZGrid()
Dim LastLig As Long, i As Long
Dim LastCol As Integer, j As Integer
Dim TbCol, TbLig, TbData
With ThisWorkbook.Worksheets("Speed & Aero Map")
LastLig = .Cells(.Rows.Count, 2).End(xlUp).Row
TbLig = .Range(.Cells(24, 2), .Cells(LastLig, 2))
LastCol = .Cells(23, .Columns.Count).End(xlToLeft).Column
TbCol = .Range(.Cells(23, 3), .Cells(23, LastCol))
TbData = .Range(.Cells(24, 3), .Cells(LastLig, LastCol))
End With
ReDim FrontRideHeightCZ(1 To UBound(TbLig, 1))
ReDim RearRideHeightCZ(1 To UBound(TbCol, 2))
ReDim CZ(1 To UBound(TbData, 1), 1 To UBound(TbData, 2))
For i = 1 To UBound(TbLig, 1)
FrontRideHeightCZ(i) = TbLig(i, 1)
Next i
For j = 1 To UBound(TbCol, 2)
RearRideHeightCZ(j) = TbCol(1, j)
For i = 1 To UBound(TbLig, 1)
CZ(i, j) = TbData(i, j)
Next i
Next j
End Sub |
Partager