Bonjour,
je ne comprend pas pourquoi mais impossible d'exécuter cette macro.
Pouvez vous m'aider SVP.
Sub valeur_ass()
Set W = Worksheets("coeur")
nom = ActiveSheet.Name
Application.Goto Reference:="coeur"
Range("A1").Select
Application.Goto Reference:="coeurold"
Range("A1").Select
Sheets("données").Select
lig0 = 2
While Cells(lig0, 1) <> ""
nass = lig0 - 1
lig0 = lig0 + 1
Wend
For ass = 1 To nass
posass = Sheets("données").Cells(ass + 1, 1).Value
valeur = Sheets("données").Cells(ass + 1, 2).Value
ancpos = Sheets("données").Cells(ass + 1, 3).Value
indlig_posass = Val(Right(posass, 2))
indcol_posass = Left(posass, 1)
lig0 = indlig_posass + 4
'conversion en ascii : asc
col0 = Asc(UCase(indcol_posass))
If col0 < 73 Then
col00 = (82 - col0 - 2)
ElseIf col0 < 79 Then
col00 = (82 - col0 - 1)
ElseIf col0 < 81 Then
col00 = (82 - col0)
Else
col00 = (82 - col0 + 1)
End If
col00 = col00 + 4
'Sheets(nom).Cells(lig0, col00).Value = valeur
Sheets("coeur").Cells(lig0, col00).Value = valeur
Sheets("coeur-old").Cells(lig0, col00).Value = ancpos
With Sheets("coeur").Cells(lig0, col00).Font
.Name = "Arial"
.Size = 8
' .ColorIndex = 1
End With
With Sheets("coeur-old").Cells(lig0, col00).Font
.Name = "Arial"
.Size = 8
' .ColorIndex = 1
End With
Next ass
Sheets("coeur").Select
End Sub