0% found this document useful (0 votes)
24 views

Learn Programming Excell

Programming involves using algorithms and a programming language to solve problems. An algorithm is a sequence of instructions, like steps for eating an apple. Programming begins with variable declaration, where variables of different data types like integers and strings are defined. Excellent programming also involves the use of loops, which allow code to repeat efficiently. Loops in VBA include Do...Loop and For...Next loops.

Uploaded by

RianKun
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Learn Programming Excell

Programming involves using algorithms and a programming language to solve problems. An algorithm is a sequence of instructions, like steps for eating an apple. Programming begins with variable declaration, where variables of different data types like integers and strings are defined. Excellent programming also involves the use of loops, which allow code to repeat efficiently. Loops in VBA include Do...Loop and For...Next loops.

Uploaded by

RianKun
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Learn Programming excell

From Basic

1. Introduce Programming
Programming is art of used one or more algorithm that related
of programming language so it can calculate what
programmer needed.
What is algorithm?
Algorithm is sequence of instruction.
Example of algorithm is steps of eating apple
1. Clean this fruit with water
2. Take knife to split apple.
3. Take part of apples with hand
4. Put in your mouth
5. Chew of apple parts
6. And swallow it

2. Write Programming
/program
Variable Declaration

/Main program
Begin

End

Excell Programming
1. Variable declatration

Data type
Byte
Boolean
Integer

size Range
0 to 255
True or False
-32,768 to 32,767
-2,147,483,648 to
2,147,483,647
-3.402823E38 to
-1.401298E-45 ( for
negative values);
1.401298E-45 to
3.402823E38 for positive
values
-1.79769313486231E308
to -4.94065645841247E324 for negative values;
4.94065645841247E-324
to
1.79769313486232E308
for positive values
0 to approximately 2
billion characters
Any numeric value up to
the range of a Double
string Same range as for
variable-length String

.You have seen many examples of the use of variables

for storing information. ItLong


is now time to discuss
the rules for creating variable names, look at different
types of variables, and talk about the best way to
Single
define variables.
example
Dim i As Integer
Double
.Dim lRow As Long
String
.Dim dProduct As Double Variant
Variant
.Dim sName As String
.Dim vValue As Variant

2. Looping
All computer languages provide a mechanism for repeating the same, or
similar, operations in an efficient way. VBA has two main structures that
allow you to loop through the same code over and overagain. They are
the Do...Loop and the For...Next loop.
Example:
* For i =1 to i<=5

Next
* i=1
Do While i <=5

i=i+1
Loop

WorkBooks

You might also like