counting columns
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 » Counting Columns

Counting Columns

resolvedResolved · Low Priority · Version 2003

replyReply Mon 1 Dec 2008, 16:25Delegate Charlene said...

Charlene has attended:
Excel VBA Intro Intermediate course

Counting Columns

How would you count up to the last column?

For upcoming training course dates see: Pricing & availability

replyReply Tue 9 Dec 2008, 15:55Trainer Carlos said...

RE: Counting Columns

Hi Charlene

In VBA if you have a range/table of data and need to know the number of columns you do the following:

1. Create a Variable to hold the number of columns value
2. Select a cell in the range
3. Use code to count the columns and save the answer in the variable. For example:

Sub NumberOfColumns()

Dim NumOfColumns As Integer

Sheets(

Mon 15 Dec 2008: Automatically marked as resolved.

 

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

Excel tip:

Display pictures on Chart Data Point

Replacing a single chart data point bar with a picture.
Step 1: Left click on a bar. Then, wait, and do a second single click on the bar. This will select just one data point.

Step 2: Right click on the bar and select Format Data Point.

Step 3: On the fill effects tab, choose a picture. Browse for a picture for that bar. Indicate if you want it to be stretched or stacked. Repeat for each bar.

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