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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,214,431
Messages
6,119,458
Members
448,899
Latest member
maplemeadows

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
Back
Top