I agree with Paul in most respects.

I would do one macro which does all 3 things.

I would start from the top rather than from the bottom because the macro
would be accumulating the two subtotals as it ran and then inserting the
two rows, colouring them and populating them.

I am assuming that the data for the subtotals is in specific columns in the
rows for that mobile no.

Starting from the top might mean you need to put an indicator in the row
following the last row and test for that using a while loop

*It would be helpful to know what further processing you are planning to do
on this sheet* as it may influence the ways some of the cells are filled.
 For example if you are planning to insert further item rows into the sheet
it would be helpful to use subtotal formulas for the  - er subtotals,
rather than numbers so they can update and the column can be added without
including these items.




Regards
David Grugeon


On 7 February 2013 23:14, FreeRangeJ <jsgilchr...@gmail.com> wrote:

> I'm building a template for processing supplier billing data with the
> corresponding process documentation for someone else to use the template on
> a monthly basis.
>
> It's based on mobile phone numbers and the supplier information has
> multiple rows against any one mobile number, but against700 to 1200
> individual mobile numbers in any one billing cycle so manual intervention
> just takes too much staf time.
>
> I want to know, firstly, if the things i want to automate are possible
> with Macro's, these being:
>
> *Macro1:  *With the worksheet sorted based on the mobile phone number
> column, i want to run a macro to insert 2 blank rows after every group of
> rows that are for one mobile number, so say the mobile number is held in
> column K, as soon as the value in that column changes (i.e. changes to the
> next mobile number) insert 2 blank rows, preferable the first new row being
> filled in one colour and the second in another, but colouring is not too
> important.
>
> Would it also be possible, to have this first Macro, or maybe another one
> to run next, to autopopulate the new rows based on the data in the rows
> above, except the two financial columns, and for the 2 date columns, to use
> the earliest date in one column and the latest date in the other?
>
> *Macro2:  *The source data contains charges against, say for example, 12
> charge types, i want to add all the charges against say 8 of the 12 charge
> types and have this total in the first of the two inserted (maybe coloured
> in) rows, for every grouping of data against the same monile number
>
> *Macro3:  *To add up the other, for example, 4 of the 12 charge types and
> have this total in the second of the inserted rows, again, for each
> grouping of data against the same monile number.
>
> Obviously these will take some working out, but at this stage i just want
> to know that i;m right in thinking that these activities are possible to
> automate with VBA Macros?
>
> Thanks for taking the time to read this and hopefully steer me in the
> right direction!
>
> Jason
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to