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
| Sub fNIRSBloc()
Dim i As Long
Dim x As Long
Dim c As Integer
'démarrage de la macro de transposition
Cells(1, 1) = "*"
For c = 2 To 6
For i = 9 To 1000
If Not IsEmpty(Cells(i, 7)) Then
x = 12
While IsEmpty(Cells(i, c))
If IsEmpty(Cells(1, x + 1)) Then
Cells(i, c).value = Cells(1, 1).value
ElseIf Not IsEmpty(Cells(1, x + 1)) Then
If Cells(i, 7) >= Cells(1, x) And Cells(i, 7) < Cells(1, x + 1) Then
Cells(i, c).value = Cells(c, x).value
Else
x = x + 1
End If
End If
Wend
End If
Next i
Next c
End Sub |
Partager