Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MMH MMH is offline
external usenet poster
 
Posts: 14
Default 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 :)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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.



MMH wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
MMH MMH is offline
external usenet poster
 
Posts: 14
Default AutoSum for variable number of cells

That is absolutely fantastic. I never knew that function was there.

Thank you very much.

MMH :)



"Dave Peterson" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum over a variable number of cells SD Excel Discussion (Misc queries) 4 April 29th 23 07:44 PM
Summing a Variable Number of Cells hammerdin Excel Discussion (Misc queries) 1 August 27th 07 11:43 PM
Autosum variable range in macro Tim Zych[_2_] Excel Programming 0 September 4th 03 04:52 AM
Autosum variable range in macro Tom Moore [MSFT] Excel Programming 1 September 3rd 03 10:52 PM
Autosum variable range in macro Jeffrey Marcellus Excel Programming 1 September 3rd 03 10:36 PM


All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"