-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSuspended Load
69 lines (60 loc) · 1.33 KB
/
Suspended Load
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Sub DescargaSolidaSuspensao()
Dim q, Css As Integer
Dim contador As Integer
Dim Celula As Range
Dim i As Long
i = 6
Do
q = Cells(i, 3).Value
Css = Cells(i, 4).Value
For Each Celula In Range("$B$6:$D$36")
If (Not IsEmpty(Celula) And Celula.Value <= 0) Then
contador = contador + 1
Celula.Interior.ColorIndex = 3
Else
Celula.Interior.ColorIndex = 6
End If
Next Celula
If (contador > 0) Then
MsgBox "Por favor, verifique os valores em vermelho...", vbOKOnly
Else
Qss = 0.0864 * q * Css
Cells(i, 5).Value = Qss
End If
i = i + 1
Loop While Cells(i, 4) <> ""
End Sub
Sub LimparCampoQss()
'Clear contentes of Sheet 2 ("Qss")
Range("B6:E100").Select
Selection.ClearContents
End Sub
Sub VoltarFrmSedimentTool()
With Planilha1
.Visible = xlSheetVisible
End With
With Planilha2
.Visible = xlSheetVeryHidden
End With
Frm_SedimentTool.Show
End Sub
Sub DescargaSolidaSuspensao_Soma()
Sheets("Qss").Activate
i = 6
Do
Soma = Soma + Sheets("Qss").Cells(i, 5).Value
i = i + 1
Loop While Cells(i, 5) <> ""
Planilha2.TB_QssSoma.Value = Soma
End Sub
Sub DescargaSolidaSuspensao_Media()
Dim Media As Double
Sheets("Qss").Activate
i = 6
Do
Soma = Soma + Sheets("Qss").Cells(i, 5).Value
i = i + 1
Media = (Soma / (i - 6))
Loop While Cells(i, 5) <> ""
Planilha2.TB_QssMedia.Value = Media
End Sub