Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA insert rows
VBA insert rows
Resolved · Low Priority · Version 2003
VBA insert rows
Could you help me with the code requirdd insert rows on multiple worksheetsFor upcoming training course dates see: Pricing & availability
RE: VBA insert rows
Hi SteveThanks for your question.
Can you just clarify for me the following points.
1. Do you need to insert single or multiple rows?
2. If the later, are they grouped together, or spread over the entire sheet
Thanks
Stephen
RE: VBA insert rows
Hi Stephen,I have created some management accounts with a worksheet for each cost centre. If then we want to create a new line in the accounts, a new type of travel cost etc., I want to be able to insert a new line in each cost centres accounts and add into the line the name of the new cost and a formula.
Hope that is clearer.
Cheers
Tim
RE: VBA insert rows
Hi TimThanks for the update.
I suggest the following approach
1. Use a "For each" loop to go to each worksheet in the workbook.
2. Within the loop (for each sheet), insert a new row in the appropriate place. The following is a sample of code for this.
Range("A2").Rows.Insert shift:=xlDown3. set the new cost and formula as the values of the relevant cell.
Hope this helps
Regards
Stephen
|
|
What's Hot And What's Not In Word 2010 As part of the Microsoft Office 2010 suite, Word is the platform for a new set of editing and formatting tools giving you even greater control with text, design and layout. If you’re wondering whether it’s time to take the plunge, here are just a few of the new features to whet your appetite. » Article: Course microsoft training word |
» Forum post: Extracting data from project into Excel |



Course updates

