Grazie a dodo47 (un saluto)
Per la prima volta sono riuscito fare una Function? Sebbene sia contrario e preferisca le Sub
L'utente dice d'aver 30fogli, ogni qualvolta che scrive in altri fogli (nelle celle AU4:AY33) appare #NOME? Comunque usando l'allegato di dodo47 in cella AW4 (che esiste una formula in errore), inserendoci =LastS_TOT(F4:AQ4) e trascinando in basso, conta le ultime S
Function LastS_TOT(rng As Range) As Long
x = 0
For j = 43 To 6 Step -1
If Cells(rng.Row, j) <> "" Then
If Cells(rng.Row, j) = "S" Then
x = x + 1
Else
LastS_TOT = x
Exit Function
End If
End If
Next j
LastS_TOT = x
End Function
Excel 2013