If MaxPrice > 23,000.00$ Then MaxPrice=23,500.00$
If Student_Card(100).FullName Like "*" Then number=Student_Card(100).Group
VBA.
:
Not And Or | "" "" | r Imp Eqv | "" |
. 1 , 1, 2 ..
, Else, , , End If.
19.23. If
If AvgPrice > 12000 Then DiffPrice=Full(234, 45600) | 1 1 , |
ElseIf AvgPrice > 24000 Then DiffPrice=Full(12000, 45000) ElseIf AvgPrice > 36000 Then DiffPrice=Full(24000, 50000) Else DiffPrice=Full(36000, 70000) End If | 2 2 , 3 3 , 1 3 , If |
Select Case. , ():
: Case 45 Case 3, 4, 5, Case 5 12.
, Else, Else , , End Case.
19.24.
Select CDemse | Select, , Demse |
CaseDemse21 | |
Dem=21 | , |
Case Demse 22; 25; 28 | |
Dem=31 | , |
Case Demse 45 To 48 | , Cdemse 45 48 |
Dem=41 | , |
Case Else | |
Dem=51 | |
End Case | Select |
For-Next. , , , () , ..:
|
|
, Next. ( ), ( ) .
, , Next.
Exit For. , Next. For-Next .
19.25.
Sub stickRandom() Dim numrows As Integer; numcols As Integer Dim therow As Integer; thecol As Integer numrows = Selection.Rows.Count numcols = Selection.Columns.Count Debug. Print numrows; numcols Randomize Debug.Print Rnd For therow = 1 To numrows For thecol = 1 To numcols Selection. Cells(therow; thecol).Value = Rnd Next thecol Next therow End Sub | Selection Cells Value "" |
Do-Loop. , Do , Loop ; 4 :
1) True
Do While <>
< >
Exit Do
< >
Loop
, <>. 0. Exit Do Loop .
2) True
Do
< >
Exit Do
< >
Loop While <>
, <>.
3) False
Do Until <>
< >
Exit Do
< >
Loop
Until , , <> . 0.
4) False
Do
< >
Exit Do
< >
Loop Until <>
, , . 1.
19.26.
Option Explicit Sub Do_Rnd() Dim a As Single Dim i As Integer, Randomize Do While True a=Rnd | Do. | |
Debug.Print a If a > 0.99 Then Exit Do Loop End Sub | ||
While-Wend. Do While-Loop. (Exit Do ), .
|
|
While <>
< >
Wend
For Each. , .. () . , . .
For Each <> In <>
< >
Exit For
< >
<> Variant, <> . Exit For.