never coded before but eager to learn. There are a few things I want this code to do:
1. If the user input into B6 makes the value of K6 go above 655, pop up....that works fine
2. If the total value of B13 exceeds 100, pop up...that works fine
3. A value input into B9 should force B11 and B12 to zero. Also, a value input into B11 or B12 should also force B9 to zero. it's a safety measure to keep someone from mixing oxygen (B9) with methane (flammable B11) OR hydrogen (flammable B12)
the macro should run automatically any time there is a change to B5:B12
Code:
Private Sub worksheet_change(ByVal Target As Range)
Dim keycells As Range
Set keycells = Range("B5:B12")
If Range("k6").Value > 655 Then MsgBox "CO2 Vapor Pressure Exceeded, Reduce Fill Pressure"
If Range("B13").Value > 100 Then MsgBox "Percentage Exceeds 100%"
If Range("H11").Value > 0 And Range("H9").Value > 0 Then MsgBox "Danger, Fuel/Oxidizer Mixture"
End If
End Sub
1. If the user input into B6 makes the value of K6 go above 655, pop up....that works fine
2. If the total value of B13 exceeds 100, pop up...that works fine
3. A value input into B9 should force B11 and B12 to zero. Also, a value input into B11 or B12 should also force B9 to zero. it's a safety measure to keep someone from mixing oxygen (B9) with methane (flammable B11) OR hydrogen (flammable B12)
the macro should run automatically any time there is a change to B5:B12
Code:
Private Sub worksheet_change(ByVal Target As Range)
Dim keycells As Range
Set keycells = Range("B5:B12")
If Range("k6").Value > 655 Then MsgBox "CO2 Vapor Pressure Exceeded, Reduce Fill Pressure"
If Range("B13").Value > 100 Then MsgBox "Percentage Exceeds 100%"
If Range("H11").Value > 0 And Range("H9").Value > 0 Then MsgBox "Danger, Fuel/Oxidizer Mixture"
End If
End Sub