I have the following code:

Private Sub CheckBox275_Click()
If CheckBox275 Then
Sheets("01-01").Range("I52").Formula = "=Sum(D52:R6)"
Else
Range("I52").ClearContents
End If
End Sub


When I check the box, a zero appears in I52. I was confused since there was data in D52 and R6. Then I clicked on I52 and the value says =sum(D6:R52). I went back and checked the code and it has it D52:R6. Why and/or how is it reversing this?

Thanks!