Learn Programming Excell
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
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