Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA
VBA
Resolved · High Priority · Version 2003
Saif has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
VBA
How can I enter a line on the spreadsheet after each customer name?
For upcoming training course dates see: Pricing & availability
RE: VBA
Hi Saif
Thank you for your question
First you need to sort the data by customer name.
You then need to move down the data a row at a time until the customer name changes. When that happens
Rows(intRowCount).Insert
Will insert a row in the relevant place.
Note inserting a row will disrupt the current region, and so you cannot use the count method to determine how many rows there are. I suggest
Do until cells(intRowCount,1).Value = ""
as a looping structure. The code will run until it encounters an empty cell.
Regards
Stephen
Mon 29 Jun 2009: Automatically marked as resolved.
|
