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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| Dim rst(1, 7) As String
Function identif(a As String, b As String, c As String, d As String, e As String)
Dim Appareil As String
Dim App2 As String
Dim mat As String
Dim CL1 As String
Dim CL2 As String
Dim Si As String
Dim ob As String
Dim Racc As String
Worksheets("appareil").Activate
For i = 4 To 26
If Cells(4, i).Value Like a Then
Appareil = Cells(4, i).Offset(-2, 0).Value
App2 = Cells(4, i).Offset(-1, 0).Value
End If
Next
Worksheets("Corps").Activate
For i = 4 To 35
If Cells(4, i) = b Then
mat = Cells(4, i).Offset(-2, 0)
End If
Next
Worksheets("CL-PN").Activate
For i = 4 To 23
If Cells(4, i) = c Then
CL1 = Cells(4, i).Offset(-2, 0)
CL2 = Cells(4, i).Offset(-1, 0)
End If
Next
Worksheets("Portées").Activate
For i = 6 To 32
If Cells(15, i) = d Then
Si = Cells(15, i).Offset(-2, 0)
ob = Cells(15, i).Offset(-1, 0)
End If
Next
Worksheets("Raccordement").Activate
For i = 6 To 12
If Cells(4, i) = e Then
Racc = Cells(4, i).Offset(-1, 0)
End If
Next
rst(1, 1) = "=Appareil + App2"
rst(1, 2) = mat
rst(1, 3) = CL1
rst(1, 4) = CL2
rst(1, 5) = Si
rst(1, 6) = ob
rst(1, 7) = Racc
identif = rst
End Function |
Partager