Hi could someone explain to me exactly what the code below is doing especially the IF Statements

Thanks in advance

Sub Calc()

    Sheets("Sheet2").Activate
    ActiveSheet.Unprotect Password:="0000"
    Range("TensionR").Locked = False
    Range("CompressionR").Locked = False
    
    If Left(Right(Range("b1").Value, 1), 1) = "." Then
        Range("o1").FormulaR1C1 = "=1"
        Run ("Dec0")
   Else
    
    If Left(Right(Range("b1").Value, 1), 1) = "." Then
        Range("o1").FormulaR1C1 = "=1"
        Run ("Dec0")
   Else
    
    If Left(Right(Range("b1").Value, 2), 1) = "." Then
        Range("o1").FormulaR1C1 = "=2"
        Run ("Dec1")
  Else
    
    If Left(Right(Range("b1").Value, 3), 1) = "." Then
        Range("o1").FormulaR1C1 = "=3"
        Run ("Dec2")
 Else
    
    If Left(Right(Range("b1").Value, 4), 1) = "." Then
        Range("o1") = 4
        Run ("Dec3")
   Else
    
    If Left(Right(Range("b1").Value, 5), 1) = "." Then
        Range("o1").FormulaR1C1 = "=5"
        Run ("Dec4")
   Else
    
    Range("o1").FormulaR1C1 = "=0"
    
    End If
    End If
    End If
    End If
    End If
    End If
    
    ActiveSheet.Protect Password:="0000"
    
End Sub