Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

arrays

ResolvedVersion 2007

Peter has attended:
Excel VBA Intro Intermediate course
Excel VBA Intro Intermediate course

Arrays

What is the purpose of an array and how would this help my VBA code?

RE: Arrays

Hi Peter, thanks for your query. Arrays are used for two purposes - to hold vastly more data than can be held on an Excel worksheet and to do things quickly. By manipulating your data in an array you leverage the processing power of the computer far more efficiently than wasting computational power and time rendering the data manipulation on the worksheet. I would head in the direction of arrays if my source data was huge and the time it took to process that data was lengthy.

There is an excellent page on arrays here, which links to a file containing some extremely useful examples:

http://www.cpearson.com/excel/vbaarrays.htm

Hope this helps,

Anthony

Thu 4 Aug 2011: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Calculate difference between two times

For presenting the result in the standard time format (hours : minutes : seconds . Use the subtraction operator (-) to find the difference between times, and the TEXT function to format the returned value to text in a specific number format.

Hours never exceed 24, minutes never exceed 60, and seconds never exceed 60.

=TEXT(B2-A2,"h")
Hours between two times (4)

=TEXT(B2-A2,"h:mm")
Hours and minutes between two times (4:55)

=TEXT(B2-A2,"h:mm:ss")
Hours and seconds between two times (4:55:00)

Where B2 and A2 must hold the end time and start time respectively formatted as a time format

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.