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
| Sub RA()
Dim i As Integer
Dim x1, x2, x3, x4, x5 As String
' x1 = Type of project'
' x2 = Where'
' x3 = Type of water'
' x4 = Duration'
' x5 = Workforce'
x1 = Sheets("HSE").Range("B4").Value
x2 = Sheets("HSE").Range("D4").Value
x3 = Sheets("HSE").Range("B6").Value
x4 = Sheets("HSE").Range("D6").Value
x5 = Sheets("HSE").Range("B10").Value
For i = 5 To 436
If Sheets1("B" & i).Value = x1 And Sheets1("C" & i).Value = x2 And Sheets1("D" & i).Value = x3 And Sheets1("E" & i).Value = x4 And Sheets1("F" & i).Value = x5 Then
Sheets("HSE").Range("H4").Value = Sheets1("A" & i).Value
End If
Next i
End Sub |
Partager