formula said:
what if i add cell A5 is blank, then A6 is still P2. now with A1:A6, then
the formula should be???
Your question is not entirely clear to me. Obviously you would simply
change all occurrences of "A1:A5" to "A1:A6" in the formula. I wonder
if you are really asking: what can you do so that Excel will update
the ranges in the formula automatically? The answer is: you need to
move A5 down to A6 either by dragging it or by inserting a row above
A5.
On the other hand, if you are wondering if the blank cell would somehow
screw up the sum, the answer is: no. The LEFT() part of the formula
ensures that we only sum the RIGHT() part that corresponds to "G" (or
to "P" if you make the appropriate change) Study the LEFT and RIGHT
function help pages.