Q:

Loop through columns that vary from 1 to 31

I'm trying to do a calculation that will loop through multiple columns, the maximum would be 31 columns (31 days in a month).
Starting from "B8", next column would be "C8" ...
Excel template

I managed to calculate the first range.
I want to add a loop to calculate the number of hours for every existing column: Which could vary from 1 day to 31 days depending on the person using the excel template.
The number of projects could vary too "Code OTP" from 1 to 10 projects.
Update of my code:
Sub CalculHeuresTravail()
Application.ScreenUpdating = False
Dim i As Integer, firstDate As Date, secondDate As Date, n, rng As Range
Set ws = ThisWorkbook.Sheets("Feuil1")
MaSomme = 0
i = 8
f = 8

firstDate = ws.Range("E2")
secondDate = ws.Range("E3")
n = DateDiff("d", firstDate, secondDate)
n = n + 1

While ws.Range("A" & i).Value <> ""
    i = i + 1
Wend

While f < i
    MaSomme = MaSomme + ws.Range("B" & f).Value
    f = f + 1  
Wend

If MaSomme = "8,8" Then
    MsgBox "OK"
    Else: MsgBox "NON"
End If
End Sub

A:

Here above is the solution that worked for me : 
It loops through every column specified in a variable range stocked in a variable called 'e' that calculates the first column to start with and number of days specified by the user.
Sub CalculHeuresTravail()
Application.ScreenUpdating = False
Dim i As Integer, firstDate As Date, secondDate As Date, nombreDeJours, rng As Range, e
Set ws = ThisWorkbook.Sheets("Feuil1")

    nombreDeProjets = 8

    firstDate = ws.Range("E2")
    secondDate = ws.Range("E3")
    nombreDeJours = DateDiff("d", firstDate, secondDate)
    nombreDeJours = nombreDeJours + 1

    While ws.Range("A" & nombreDeProjets).Value <> ""
     nombreDeProjets = nombreDeProjets + 1
    Wend

    IndiceDeColomne = 2
    e = IndiceDeColomne + nombreDeJours
    While IndiceDeColomne < e
        caseDebutHeures = 8
        MaSomme = 0
        While caseDebutHeures < nombreDeProjets

            MaSomme = MaSomme + ws.Cells(caseDebutHeures, IndiceDeColomne).Value
            caseDebutHeures = caseDebutHeures + 1
            ws.Cells(6, IndiceDeColomne).Value = MaSomme
        Wend

        If MaSomme = "8,8" Then
            MsgBox "Colomne " & IndiceDeColomne & " OK"
            Else: MsgBox "Colomne " & IndiceDeColomne & " NON OK"
        End If

        IndiceDeColomne = IndiceDeColomne + 1
    Wend
End Sub

