Vous êtes sur la page 1sur 8

Private Sub CommandButton1_Click()

Dim b As Double, c As Double, d As Double, e As Double, f As Double, g As Double


, h As Double, i As Double, j As Double, k As Double, l As Double, m As Double,
n As Double, o As Double, p As Double, q As Double, r As Double, s As Double, t
As Double, u As Double, v As Double, w As Double, aa As Double, ab As Double, ac
As Double, ad As Double
'j
'b
'c
'd
'e
'f
'g
'h
'i
'j
'k
'l
'm
'n
'o
'p
'q
'r
's
't
'u
'v
'w

adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah

baris
muka air
reach length
fall
area upstream
area downstream
penampampang basah upstream
penampang basah downstream
hydraulic upstream
hydraulic downstream
manning
conveyance upstream
conveyance downstream
conveyance reach
energy slope
peak discharge
velocity upstream
velocity downstream
velocity head upstream
velocity head downstream
nilai k
nilai Si
nilai Qi update

x = 5
Do While x < Cells(1, 5)
y = x
b = Cells(x, 2)
Sheets("Report_Kalibrasi").Range("B"
c = Cells(x, 3)
Sheets("Report_Kalibrasi").Range("C"
d = Cells(x, 4)
e = Cells(x, 5)
f = Cells(x, 6)
g = Cells(x, 7)
h = Cells(x, 8)
i = Cells(x, 9)
j = Cells(x, 10)
k = Cells(x, 11)
Sheets("Report_Kalibrasi").Range("D"
l = Cells(x, 12)
m = Cells(x, 13)
n = Cells(x, 14)
o = Cells(x, 15)
Sheets("Report_Kalibrasi").Range("E"
p = Cells(x, 16)
q = Cells(x, 17)
r = Cells(x, 18)
s = Cells(x, 19)
t = Cells(x, 20)
u = Cells(x, 21)
v = Cells(x, 22)

& y).Value = b
& y).Value = c

& y).Value = k

& y).Value = o

w = Cells(x, 23)
Sheets("Report_Kalibrasi").Range("F" & y).Value = w
Range("I" & y).Value
Range("J" & y).Value
Range("L" & y).Value
Range("M" & y).Value
Range("N" & y).Value
Range("O" & y).Value
Range("P" & y).Value
'awal literasi 2
Range("S" & y).Value
Range("T" & y).Value

=
=
=
=
=
=
=

e / g
f / h
(1 / k) * e * (i ^ 0.66666667)
(1 / k) * f * (j ^ 0.66666667)
(l * m) ^ 0.5
d / c
n * (o ^ 0.5)

= (q * ((p / e) ^ 2)) / (2 * 9.81)


= (r * ((p / f) ^ 2)) / (2 * 9.81)

If f > e Then
Range("U" & y).Value = 0.5
Else
Range("U" & y).Value = 1
End If
Range("V" & y).Value = ((d + (u * (s - t))) / c)
Range("W" & y).Value = n * (v ^ 0.5)
Sheets("Report_Kalibrasi").Range("F" & y).Value = w
x = x + 1
Loop
x = 5
Do While x < Cells(1, 5)
y = x
b = Cells(x, 2)
Sheets("Report_Kalibrasi").Range("B"
c = Cells(x, 3)
Sheets("Report_Kalibrasi").Range("C"
d = Cells(x, 4)
e = Cells(x, 5)
f = Cells(x, 6)
g = Cells(x, 7)
h = Cells(x, 8)
i = Cells(x, 9)
j = Cells(x, 10)
k = Cells(x, 11)
Sheets("Report_Kalibrasi").Range("D"
l = Cells(x, 12)
m = Cells(x, 13)
n = Cells(x, 14)
o = Cells(x, 15)
Sheets("Report_Kalibrasi").Range("E"
p = Cells(x, 16)
q = Cells(x, 17)
r = Cells(x, 18)
s = Cells(x, 19)
t = Cells(x, 20)
u = Cells(x, 21)
v = Cells(x, 22)
w = Cells(x, 23)
Sheets("Report_Kalibrasi").Range("F"
Range("I" & y).Value = e / g

& y).Value = b
& y).Value = c

& y).Value = k

& y).Value = o

& y).Value = w

Range("J" & y).Value


Range("L" & y).Value
Range("M" & y).Value
Range("N" & y).Value
Range("O" & y).Value
Range("P" & y).Value
'awal literasi 2
Range("S" & y).Value
Range("T" & y).Value

=
=
=
=
=
=

f / h
(1 / k) * e * (i ^ 0.66666667)
(1 / k) * f * (j ^ 0.66666667)
(l * m) ^ 0.5
d / c
n * (o ^ 0.5)

= (q * ((p / e) ^ 2)) / (2 * 9.81)


= (r * ((p / f) ^ 2)) / (2 * 9.81)

If f > e Then
Range("U" & y).Value = 0.5
Else
Range("U" & y).Value = 1
End If
Range("V" & y).Value = ((d + (u * (s - t))) / c)
Range("W" & y).Value = n * (v ^ 0.5)
Sheets("Report_Kalibrasi").Range("F" & y).Value = w
x = x + 1
Loop
x = 5
Do While x < Cells(1, 5)
y = x
b = Cells(x, 2)
Sheets("Report_Kalibrasi").Range("B"
c = Cells(x, 3)
Sheets("Report_Kalibrasi").Range("C"
d = Cells(x, 4)
e = Cells(x, 5)
f = Cells(x, 6)
g = Cells(x, 7)
h = Cells(x, 8)
i = Cells(x, 9)
j = Cells(x, 10)
k = Cells(x, 11)
Sheets("Report_Kalibrasi").Range("D"
l = Cells(x, 12)
m = Cells(x, 13)
n = Cells(x, 14)
o = Cells(x, 15)
Sheets("Report_Kalibrasi").Range("E"
p = Cells(x, 16)
q = Cells(x, 17)
r = Cells(x, 18)
s = Cells(x, 19)
t = Cells(x, 20)
u = Cells(x, 21)
v = Cells(x, 22)
w = Cells(x, 23)
Sheets("Report_Kalibrasi").Range("F"
Range("I"
Range("J"
Range("L"
Range("M"
Range("N"

&
&
&
&
&

y).Value
y).Value
y).Value
y).Value
y).Value

=
=
=
=
=

& y).Value = b
& y).Value = c

& y).Value = k

& y).Value = o

& y).Value = w

e / g
f / h
(1 / k) * e * (i ^ 0.66666667)
(1 / k) * f * (j ^ 0.66666667)
(l * m) ^ 0.5

Range("O" & y).Value


Range("P" & y).Value
'awal literasi 2
Range("S" & y).Value
Range("T" & y).Value

= d / c
= n * (o ^ 0.5)
= (q * ((p / e) ^ 2)) / (2 * 9.81)
= (r * ((p / f) ^ 2)) / (2 * 9.81)

If f > e Then
Range("U" & y).Value = 0.5
Else
Range("U" & y).Value = 1
End If
Range("V" & y).Value = ((d + (u * (s - t))) / c)
Range("W" & y).Value = n * (v ^ 0.5)
Sheets("Report_Kalibrasi").Range("F" & y).Value = w
x = x + 1
Loop
End Sub
Private Sub CommandButton2_Click()
Dim Yakin As Integer, ws As Worksheet, wb As Worksheet
Set ws = Worksheets("Input_Data")
Set wb = Worksheets("Report")
Yakin = MsgBox("Apakah Yakin Dihapus?", vbOKCancel, "Verifikasi")
If Yakin = 1 Then
ws.Range("B5:X100").ClearContents
wb.Range("B5:X100").ClearContents
End If
End Sub
Private Sub CommandButton3_Click()
Dim a As Double, b As Double, c As Double, d As Double, e As Double, f As Double
, g As Double, h As Double, i As Double, j As Double, k As Double, l As Double,
x As Double, y As Double
x = 5
Do While x < Cells(1, 5)
y = x
a
b
c
d
e
f

=
=
=
=
=
=

Cells(x,
Cells(x,
Cells(x,
Cells(x,
Cells(x,
Cells(x,

2)
35)
36)
37)
38)
39)

g
h
i
j
k
l

=
=
=
=
=
=

Cells(x,
Cells(x,
Cells(x,
Cells(x,
Cells(x,
Cells(x,

2)
41)
42)
43)
44)
45)

b = Application.Lookup(a, Range("AB4:AB50"), Range("AC4:AC50"))


c = Application.Lookup(a, Range("AB4:AB50"), Range("AF4:AF50"))
d = Application.Lookup(a, Range("AB4:AB50"), Range("AB4:AB50"))

e = a - d
Range("E" & y).Value = b + c * e
h = Application.Lookup(a, Range("AB4:AB50"), Range("AD4:AD50"))
i = Application.Lookup(a, Range("AB4:AB50"), Range("AG4:AG50"))
j = Application.Lookup(a, Range("AB4:AB50"), Range("AB4:AB50"))
k = g - j
Range("G" & y).Value = h + i * k
x = x + 1
Loop
End Sub
Private Sub CommandButton4_Click()
Dim a As Double, b As Double, c As Double, d As Double, e As Double, f As Double
, g As Double, h As Double, i As Double, j As Double, k As Double, l As Double,
x As Double, y As Double
x = 5
Do While x < Cells(1, 5)
y = x
a
b
c
d
e
f

=
=
=
=
=
=

Cells(x,
Cells(x,
Cells(x,
Cells(x,
Cells(x,
Cells(x,

2)
54)
55)
56)
57)
58)

g
h
i
j
k
l

=
=
=
=
=
=

Cells(x,
Cells(x,
Cells(x,
Cells(x,
Cells(x,
Cells(x,

2)
60)
61)
62)
63)
64)

b = Application.Lookup(a, Range("AU4:AU50"), Range("AV4:AV50"))


c = Application.Lookup(a, Range("AU4:AU50"), Range("AY4:AY50"))
d = Application.Lookup(a, Range("AU4:AU50"), Range("AU4:AU50"))
e = a - d
Range("F" & y).Value = b + c * e
h = Application.Lookup(a, Range("AU4:AU50"), Range("AW4:AW50"))
i = Application.Lookup(a, Range("AU4:AU50"), Range("AZ4:AZ50"))
j = Application.Lookup(a, Range("AU4:AU50"), Range("AU4:AU50"))
k = g - j
Range("H" & y).Value = h + i * k
x = x + 1
Loop
End Sub
Private Sub CommandButton5_Click()
Dim b As Double, c As Double, d As Double, e As Double, f As Double, g As Double
, h As Double, i As Double, j As Double, k As Double, l As Double, m As Double,

n As Double, o As Double, p As Double, q As Double, r As Double, s As Double, t


As Double, u As Double, v As Double, w As Double, aa As Double, ab As Double, ac
As Double, ad As Double, x As Double, y As Double
'j
'b
'c
'd
'e
'f
'g
'h
'i
'j
'k
'l
'm
'n
'o
'p
'q
'r
's
't
'u
'v
'w

adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah
adalah

baris
muka air
reach length
fall
area upstream
area downstream
penampampang basah upstream
penampang basah downstream
hydraulic upstream
hydraulic downstream
manning
conveyance upstream
conveyance downstream
conveyance reach
energy slope
peak discharge
velocity upstream
velocity downstream
velocity head upstream
velocity head downstream
nilai k
nilai Si
nilai Qi update

Do
y = 6
b = Cells(5, 2)
c = Cells(5, 3)
d = Cells(5, 4)
e = Cells(5, 5)
f = Cells(5, 6)
g = Cells(5, 7)
h = Cells(5, 8)
i = Cells(5, 9)
j = Cells(5, 10)
k = Cells(5, 11)
l = Cells(5, 12)
m = Cells(5, 13)
n = Cells(5, 14)
o = Cells(5, 15)
p = Cells(5, 16)
q = Cells(5, 17)
r = Cells(5, 18)
s = Cells(y, 19)
t = Cells(y, 20)
u = Cells(y, 21)
v = Cells(y, 22)
w = Cells(y, 23)
x = Cells(y, 24)
aa = Cells(y, 25)
ab = Cells(y, 26)
ac = Cells(y, 27)
Sheets("Input_Data").Range("S" & y).Value = (q * (((Cells((y - 1), 23)) / e) ^ 2
)) / (2 * 9.81)

Sheets("Input_Data").Range("T" & y).Value = (r * (((Cells((y - 1), 23)) / f) ^ 2


)) / (2 * 9.81)
If Cells(5, 6) > e Then
u = 0.5
Else
u = 1
End If
Sheets("Input_Data").Range("U" & y).Value = u
aa = u * (s - t)
ab = d + aa
ac = ab / c
Sheets("Input_Data").Range("V" & y).Value = ac
Sheets("Input_Data").Range("W" & y).Value = n * (ac ^ 0.5)
Sheets("Input_Data").Range("X" & y).Value = (Cells((y - 1), 23)) / (Cells(y, 23)
)
y = y + 1
Loop Until x < 1
Do
y = 6
b = Cells(5, 2)
c = Cells(5, 3)
d = Cells(5, 4)
e = Cells(5, 5)
f = Cells(5, 6)
g = Cells(5, 7)
h = Cells(5, 8)
i = Cells(5, 9)
j = Cells(5, 10)
k = Cells(5, 11)
l = Cells(5, 12)
m = Cells(5, 13)
n = Cells(5, 14)
o = Cells(5, 15)
p = Cells(5, 16)
q = Cells(5, 17)
r = Cells(5, 18)
s = Cells(y, 19)
t = Cells(y, 20)
u = Cells(y, 21)
v = Cells(y, 22)
w = Cells(y, 23)
x = Cells(y, 24)
aa = Cells(y, 25)
ab = Cells(y, 26)
ac = Cells(y, 27)
Sheets("Input_Data").Range("S" & y).Value = (q * (((Cells((y - 1), 23)) / e) ^ 2
)) / (2 * 9.81)
Sheets("Input_Data").Range("T" & y).Value = (r * (((Cells((y - 1), 23)) / f) ^ 2
)) / (2 * 9.81)
If Cells(5, 6) > e Then

u = 0.5
Else
u = 1
End If
Sheets("Input_Data").Range("U" & y).Value = u
aa = u * (s - t)
ab = d + aa
ac = ab / c
Sheets("Input_Data").Range("V" & y).Value = ac
Sheets("Input_Data").Range("W" & y).Value = n * (ac ^ 0.5)
Sheets("Input_Data").Range("X" & y).Value = (Cells((y - 1), 23)) / (Cells(y, 23)
)
y = y + 1
Loop Until Cells(y, 24) < 1
End Sub

Vous aimerez peut-être aussi