Public Sub test()
Dim Ligne As Long, Result As String, x As Long
Randomize 12082013
x = Int((56 - 1 + 1) * Rnd + 1)
With Sheets("MaFeuille")
.Columns(1).Clear
.[A1] = x
If IsEmpty(.[A1]) Or Not IsNumeric(.[A1]) Then
Exit Sub
Else
Ligne = .[A1]
End If
End With
Result = "Ligne -> : " & Ligne & vbCrLf
Result = Result & "Range(""A"" & Ligne).Address -> : " & Range("A" & Ligne).Address & vbCrLf
Result = Result & "Cells(Ligne, ""A"").Resize(Ligne, 3).Address -> : " & Cells(Ligne, "a").Resize(Ligne, 3).Address & vbCrLf
Result = Result & "Range(""A3:A"" & Ligne).Address -> : " & Range("A3:A" & Ligne).Address & vbCrLf & vbCrLf
Result = Result & vbTab & "Cliquez sur OK pour la suite du test."
MsgBox Result, vbInformation, "Pour infos"
With Range("A3:A" & Ligne)
.FormulaLocal = "=AUJOURDHUI()+LIGNE()"
.Font.Bold = True
.Interior.ColorIndex = x
.NumberFormatLocal = "jjjj j mmmm aaaa"
End With
End Sub