#VB, 73 bytes a=Cells(1,1) x=1 While x<=a If a Mod x = 0 Then b=b+x x=x+1 Wend MsgBox b