vba
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA

VBA

resolvedResolved · High Priority · Version 2003

replyReply Fri 19 Jun 2009, 15:39Delegate Saif said...

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

replyReply Tue 23 Jun 2009, 09:33Trainer Stephen said...

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.

 

Please browse our web site to find out more about
excel training class and other Microsoft training courses.

Excel tip:

Switching Between Spreadsheets

As the Alt+Tab key switches between loaded applications or files, Ctrl+Tab switches between loaded or open Excel files. Hold down the Ctrl key until you have tabbed to the correct spreadsheet.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard