|
|
AutoSum for variable number of cells |
|
Author |
Message |
JerryFleming
|
Posted: Wed Oct 27 19:54:50 CDT 2004 |
Top |
Excel Programming >> AutoSum for variable number of cells
I have a worksheet with $ values for different people. The data is sorted by
the name of the person, and I have inserted a blank line between each
person's values. Now I want to calculate the total value of the items for
each person in the blank line (e.g. XXX has values in F2:F11, YYY has values
in F13:F28).
I tried using the AutoSum feature, but I cannot work out how to modify the
code so it will work with a variable number of populated cells. I could
really use a hand here.
Thank you in advance for your help.
MMH :)
Excel246
|
|
|
|
|
Dave
|
Posted: Wed Oct 27 19:54:50 CDT 2004 |
Top |
Excel Programming >> AutoSum for variable number of cells
I think I would get rid of those blank lines.
Then (with the data sorted by that column), use xl's built in
Data|Subtotals to get those values.
If you add extra rows of data, remove the subtotals, resort the data and reapply
the data|subtotals.
You may want to look at Data|pivottable, too.
>
> I have a worksheet with $ values for different people. The data is sorted by
> the name of the person, and I have inserted a blank line between each
> person's values. Now I want to calculate the total value of the items for
> each person in the blank line (e.g. XXX has values in F2:F11, YYY has values
> in F13:F28).
>
> I tried using the AutoSum feature, but I cannot work out how to modify the
> code so it will work with a variable number of populated cells. I could
> really use a hand here.
>
> Thank you in advance for your help.
> MMH :)
--
Dave Peterson
|
|
|
|
|
MMH
|
Posted: Wed Oct 27 20:25:05 CDT 2004 |
Top |
Excel Programming >> AutoSum for variable number of cells
That is absolutely fantastic. I never knew that function was there.
Thank you very much.
MMH :)
> I think I would get rid of those blank lines.
>
> Then (with the data sorted by that column), use xl's built in
> Data|Subtotals to get those values.
>
> If you add extra rows of data, remove the subtotals, resort the data and reapply
> the data|subtotals.
>
> You may want to look at Data|pivottable, too.
|
|
|
|
|
|
|