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

excel consultant - variables

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » excel consultant - Variables

excel consultant - Variables

ResolvedVersion Standard

Jacky has attended:
Excel VBA Intro Intermediate course

Variables

how do you create a variable?

RE: Variables

Jacky

A variable needs to be declared before it can be used. To do this:

Dim/Public <variablename> as <type>

eg

Dim Area as Single

Public UserName as String

Regards

Carlos

 

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:

Stop Formula Returning A "#DIV/0" Error

If a formula returns a #DIV/0 error message there is a way to avoid such results.

For example the formula =A1/B1 will return a #DIV/0 if B1 is empty or a zero.

If you protect your formulas with the ISERROR function, the formula will then look like this:

=IF(ISERROR(A1/B1),0,A1/B1)

In plain English: should the result of A1 divided by B1 be an error change the result to 0 else show the result of A1/B1.

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.