Fill cells down with macro

Riaang

Board Regular
Joined
Aug 29, 2002
Messages
146
Hi, I have a excel spreadsheet with a lot of codes per division. I want a mocro to add a subtotal at each change in the codes and then it must fill the division name down so that I can only extract the subtotal info but still can see for wich division it is.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

philR

Active Member
Joined
Feb 25, 2002
Messages
257
If you can be a bit more specific: Need to know what cells the values you want to sum are in, where you want the answers to go etc. I have written a lot of macros to do this sort of thing, so I am sure I can help
 

Riaang

Board Regular
Joined
Aug 29, 2002
Messages
146
The spreadsheet displays the ageing on a member's account (90days, 60days, 30days, current and Total) it starts from column E to J and the paypoint is in column L. I want subtotals after the ageing at each change in L. And then column L must be filled down to bring in the paypoint detail next to each subtotal.
This message was edited by Riaang on 2002-08-31 07:29
This message was edited by Riaang on 2002-09-03 11:52
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092

ADVERTISEMENT

Have you tried a pivot table?
 

Riaang

Board Regular
Joined
Aug 29, 2002
Messages
146
Hi Andrew, The pivot table is not going to give me what I need because there is other staff that I need to do with file so I just need the paypoint detail next to each subtotal.
 

purple_103

New Member
Joined
Nov 5, 2003
Messages
1
I had exactly the same problem, but figured a quick way of doing it. I hope this helps!

If you do the subtotals command as usual (sort by the relevant column etc, & apply the subtotals command), you then have in each row of subtotals, in the column that you sorted by (say it was the name of a salesperson) something like "Joe Bloggs Total".
You can then apply a custom filter using criteria "contains - total". This will bring together all the rows with the subtotals in (ignore the fact that the formulas in the subtotaled rows now all display 0 - this will go back to the numbers it should be when the filter is removed).
These can now all be formatted without formatting the unseen rows inbetween.
In order to also display the extra info you need (assuming that it is either the same for each subtotaled group, or is in a consistent location which can be easily cell referenced) you can simply type in where you want the info " =cellref " where cellref is the cell reference of the info you need.

I hope this kinda makes sense as it is fairly difficult to explain without showing it to you!
 

Forum statistics

Threads
1,143,641
Messages
5,719,988
Members
422,257
Latest member
Calion

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top