Long datatype overflowed for me - using Double instead:
Sub Test()
Dim i As Long, dbl As Double
For i = 500000 To 1000000
dbl = dbl + i
Next
MsgBox dbl
End Sub
--
Rob van Gelder -
http://www.vangelder.co.nz/excel
"Khawajaanwar" wrote in message
...
Dear Friends I need a formula to find numberor a sum of value ranges
bewtween
500,000 to 1,000,000