DO Loop - Simple Example

1 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€87.69
List Price:  €122.77
You save:  €35.08
£75.17
List Price:  £105.24
You save:  £30.07
CA$138.15
List Price:  CA$193.41
You save:  CA$55.26
A$156.01
List Price:  A$218.42
You save:  A$62.41
S$131.13
List Price:  S$183.59
You save:  S$52.46
HK$775.83
List Price:  HK$1,086.19
You save:  HK$310.36
CHF 82.37
List Price:  CHF 115.32
You save:  CHF 32.95
NOK kr1,040.74
List Price:  NOK kr1,457.09
You save:  NOK kr416.34
DKK kr654.68
List Price:  DKK kr916.58
You save:  DKK kr261.90
NZ$167
List Price:  NZ$233.81
You save:  NZ$66.80
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳12,244.69
List Price:  ৳17,143.06
You save:  ৳4,898.36
₹8,541.58
List Price:  ₹11,958.56
You save:  ₹3,416.97
RM439.21
List Price:  RM614.91
You save:  RM175.70
₦161,317.86
List Price:  ₦225,851.46
You save:  ₦64,533.60
₨28,073.90
List Price:  ₨39,304.58
You save:  ₨11,230.68
฿3,339.06
List Price:  ฿4,674.82
You save:  ฿1,335.76
₺3,828.72
List Price:  ₺5,360.36
You save:  ₺1,531.64
B$572.08
List Price:  B$800.93
You save:  B$228.85
R1,857.55
List Price:  R2,600.64
You save:  R743.09
Лв171.49
List Price:  Лв240.10
You save:  Лв68.60
₩142,204.87
List Price:  ₩199,092.51
You save:  ₩56,887.63
₪366.59
List Price:  ₪513.24
You save:  ₪146.65
₱5,655.18
List Price:  ₱7,917.48
You save:  ₱2,262.29
¥14,198.32
List Price:  ¥19,878.22
You save:  ¥5,679.89
MX$1,953.70
List Price:  MX$2,735.25
You save:  MX$781.55
QR364.07
List Price:  QR509.71
You save:  QR145.64
P1,376.72
List Price:  P1,927.47
You save:  P550.74
KSh12,943.70
List Price:  KSh18,121.70
You save:  KSh5,178
E£5,094.13
List Price:  E£7,131.98
You save:  E£2,037.85
ብር13,446.70
List Price:  ብር18,825.91
You save:  ብር5,379.21
Kz91,690.83
List Price:  Kz128,370.83
You save:  Kz36,680
CLP$95,242.47
List Price:  CLP$133,343.27
You save:  CLP$38,100.80
CN¥731.15
List Price:  CN¥1,023.64
You save:  CN¥292.49
RD$6,020.55
List Price:  RD$8,429.01
You save:  RD$2,408.46
DA13,234.77
List Price:  DA18,529.21
You save:  DA5,294.44
FJ$225.30
List Price:  FJ$315.43
You save:  FJ$90.13
Q776.33
List Price:  Q1,086.89
You save:  Q310.56
GY$21,142.77
List Price:  GY$29,600.73
You save:  GY$8,457.95
ISK kr12,708.72
List Price:  ISK kr17,792.72
You save:  ISK kr5,084
DH928.92
List Price:  DH1,300.53
You save:  DH371.60
L1,718.78
List Price:  L2,406.37
You save:  L687.58
ден5,396.62
List Price:  ден7,555.49
You save:  ден2,158.86
MOP$805.16
List Price:  MOP$1,127.26
You save:  MOP$322.09
N$1,878.49
List Price:  N$2,629.97
You save:  N$751.47
C$3,709.18
List Price:  C$5,193
You save:  C$1,483.82
रु13,729.94
List Price:  रु19,222.47
You save:  रु5,492.52
S/373.49
List Price:  S/522.91
You save:  S/149.41
K416.97
List Price:  K583.78
You save:  K166.80
SAR375.05
List Price:  SAR525.09
You save:  SAR150.03
ZK2,869.58
List Price:  ZK4,017.53
You save:  ZK1,147.95
L436.50
List Price:  L611.12
You save:  L174.62
Kč2,193.75
List Price:  Kč3,071.34
You save:  Kč877.59
Ft35,836.25
List Price:  Ft50,172.18
You save:  Ft14,335.93
SEK kr958.55
List Price:  SEK kr1,342.01
You save:  SEK kr383.45
ARS$110,318.96
List Price:  ARS$154,450.96
You save:  ARS$44,132
Bs696.42
List Price:  Bs975.02
You save:  Bs278.59
COP$431,407.96
List Price:  COP$603,988.40
You save:  COP$172,580.44
₡50,669.87
List Price:  ₡70,939.85
You save:  ₡20,269.97
L2,580.74
List Price:  L3,613.14
You save:  L1,032.40
₲806,732.12
List Price:  ₲1,129,457.25
You save:  ₲322,725.12
$U4,215.14
List Price:  $U5,901.37
You save:  $U1,686.22
zł376.49
List Price:  zł527.11
You save:  zł150.61
Already have an account? Log In

Transcript

Okay guys, so now we're going to quickly demonstrate the simplest structure of a do loop. So here, I've got some code here with a do loop. So the first line of code will select cell A one, and then you can see here I've written a do loop and inside it, active cell dot offset one comma zero, select, and this will just go one cell down. So this is what the code will do. And as you will see, the do loop in its current form will never cease to get executed. So it will keep on executing the code over and over again.

And we will just keep on going one cell down infinitely, and this loop will never stop. So I'm going to execute this code step by step. Here's the first of all, I'm going to select cell A one and then what I'm doing here is I'm going one cell down, and I'm just holding the f8 key to make the code got executed. And if I actually press this Continue button or this run button, the code will never stop and my Excel actually will crash. So I'll not do that. But the do loop in this form will never stop executing the code.

So I'm just going to stop here and this is the simplest form of a do loop and this form is not used usually it is usually use this to until or do while so we will see that on the upcoming videos. So thank you guys for watching this video. I'll see you on the next one.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.