View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Automated report

Hi,

The best place to start is to record a macro that does what you would do
manually. Then see if it does what you want and if it doesn't post the code
here and explain in detail what works and what doesn't work.

To record a macro - Choose Tools, Macro, Record new macro. Give the macros
a name without spaces and click OK. Do all the steps you want the macro to
do and then choose Tools, Macro, Stop recorder.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"Smitty" wrote:

I have posted this request before but I have only gotten responses that

require manual intervention. I need to be able to open the worksheet and
have it automatically populated. The Data, Subtotal commands won't work for
what I need to do. I think I need a macro to do what I want to do.

I am trying to create a worksheet from the contents of another. I also need
to insert a subtotal line when the condition changes. For example, this is
what the input spreadsheet looks like.

AAA 20
AAA 30
AAA 40
BBB 20
BBB 35
BBB 15
BBB 25
CCC 25
CCC 25
CCC 25

This is what I need the new output worksheet to look like.

AAA 20
AAA 30
AAA 40
Subtotal AAA 90
BBB 20
BBB 35
BBB 15
BBB 25
Subtotal BBB 95
CCC 25
CCC 25
CCC 25
Subtotal CCC 75
Total 260

I need to avoid manual interventon and I have to be able to automatically
break on the change and insert a subtotal row. Can anyone help?