=SUM(C18:C20)

C18=30
C19=40
C20=20

Obviously should add up to 90 but is saying 60

If i putt it as =SUM(C19:C20)+C18 it does calculate 90.

Its happening for D18,E18 and so on

The cell C18 is formula

=IF(NOT(ISBLANK('16th'!F18)), '16th'!F18, "")

but C19 is

=IF(NOT(ISBLANK('17th'!F18)), '17th'!F18, "")

same really

Have tried formatting all different cells every way and it just refuses to work.
Any suggestions?