Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C4")) Is Nothing Then
Dim Nb_votants As Double
Dim Nb_Enveloppes As Integer
Dim Col_a_Masquer As Integer
Columns("C:U").EntireColumn.Hidden = False
Nb_votants = Range("C4").Value
If IsNumeric(Nb_votants) And Nb_votants > 0 Then
Nb_Enveloppes = Application.WorksheetFunction.RoundUp(Nb_votants / 100, 0)
Col_a_Masquer = (Nb_Enveloppes * 2) + 2
If Col_a_Masquer <= 20 Then
Range(Cells(1, Col_a_Masquer), Cells(1, "U")).EntireColumn.Hidden = True
End If
End If
End If
End Sub