Salut Manou,
pas fortiche en formules mais, en VBA, je me défends..
Private Sub Worksheet_Change(ByVal Target As Range)
'
Dim iRow%, iCol%, iColT%
'
On Error Resume Next
Application.EnableEvents = False
'
If Not Intersect(Target, Range("D3:AO22")) Is Nothing Then
iRow = Target.Row
iColT = [D2].End(xlToRight).Column + 1
iCol = Range("D" & iRow & ":AP" & iRow).Find(what:="N", lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlPrevious).Column + 1
iCol = IIf(iCol = 0, 4, iCol)
Range("C" & iRow).Value = WorksheetFunction.CountA(Range(Chr(64 + iCol) & iRow).Resize(1, iColT - iCol))
If Range("C" & iRow).Value = 0 Then Range("C" & iRow).Value = ""
End If
'
Application.EnableEvents = True
'
End Sub
A+