Sub Creer_Test()
Dim formule$, rng As Range: Set rng = Range("A1:J30")
formule = "=CHOOSE(RANDBETWEEN(1,5),CHAR(RANDBETWEEN(65,90)),INT(ROW()*NOW()/1600),11,"""",33)"
Application.ScreenUpdating = False
rng.Formula = formule: rng = rng.Value: rng.Locked = 0
End Sub
Sub Verouiller_Cellules_Vides()
Range("A1:J30").SpecialCells(xlCellTypeBlanks).Locked = True
' ligne ci-dessous pour test
Range("A1:J30").SpecialCells(xlCellTypeBlanks).Interior.Color = vbYellow
End Sub