I have inserted your formula and obtained the average to be 4.5 but the
standard deviation value is 0.8 which means the valued lie +or - 0.8 units
above 4.5 which is not logical as the average cannot be greater than 5 for
eg
row 1 1 2 3 4 5
row 2 0 1 2 8 19
average comes as 4.5 and std deviation using population formula comes as 0.8
or have I done any mistake
First, I never said it would be useful or "logical". I was simply
giving you what you asked for: the Excel formula to compute the
mathematical definition of std dev for grouped data.
Second, your conclusion ("values lie +/- 0.8 units around 4.5") is not
logical insofar as that is not what the std dev tells you. The std
dev is merely a measure of dispersion of data around the mean. It is
not the only measure of dispersion to use in a statistical analysis,
as Mike and Stan tried to explain. You may have simply learned that
they were right in the first place.
Moreover, the std dev does not (always) tell you anything about the
range of the data. You might be thinking of the interpretation of the
std dev in a "normal distribution" of data, which means that the
(population) data meets certain criteria. (Yours do not.) But even
in that context, we would expect only about 68% of the (population)
data, not all of the (population) data, to lie within +/- 1 sd (0.76
in your case) of the mean.
Finally, even if the std dev could be interpreted as a range for the
data, the range would be clipped (bracketed) by any real-world
constraints, e.g. 5 in your case. So hypothetically (and incorrectly
in your case), we would conclude that the range of data is -0.76 to
+0.50 around the mean. (But I reiterate: that conclusion is not
valid.)
At this point, I think it is fair to say that we have gone beyond the
Excel question and wandered into tutorial statistics. I am not
prepared to explain the latter in this forum.