D
Doug
The program below looks at a cell to see if the cell is >=5000 and if it is
adds a cost to another set of cells on the sheet. All works well until I have
an entry less than 1000. At this point it adds the cost anyway when it should
not. I need to know how to make this work when below 1000.
Thanks,
Doug
If ChkGenset.Value = False Then
Sheets("Tank").Unprotect Password:="benjamin"
Sheets("TankCalcs").Unprotect Password:="benjamin"
Sheets("TankCalcs").Range("I22").Value = ""
Sheets("Tank").Range("C13").Value = ""
Sheets("Tank").Range("F56").Value = ""
Sheets("Tank").Range("G56").Value = ""
ChkWP.Enabled = True
ChkSA.Enabled = True
Sheets("Tank").Protect Password:="benjamin"
Sheets("TankCalcs").Protect Password:="benjamin"
Else: Sheets("Tank").Unprotect Password:="benjamin"
Sheets("TankCalcs").Unprotect Password:="benjamin"
Sheets("TankCalcs").Range("I22").Value = "3"
Sheets("Tank").Range("C13").Value = Sheets("TankCalcs").Range("J30")
ChkWP.Enabled = False
ChkSA.Enabled = False
Sheets("Tank").Range("F56").Value = ""
Sheets("Tank").Range("G56").Value = ""
'looks at Total Gal of tank and if equal to or greater than 5000gal
it automatically adds the cost and weight of a manhole
If Sheets("Tank").Range("C7").Value >= "5000" Then
Sheets("Tank").Range("F56").Value =
Sheets("TankCalcs").Range("H2").Value
Sheets("Tank").Range("G56").Value =
Sheets("TankCalcs").Range("I2").Value
End If
Sheets("Tank").Protect Password:="benjamin"
Sheets("TankCalcs").Protect Password:="benjamin"
End If
adds a cost to another set of cells on the sheet. All works well until I have
an entry less than 1000. At this point it adds the cost anyway when it should
not. I need to know how to make this work when below 1000.
Thanks,
Doug
If ChkGenset.Value = False Then
Sheets("Tank").Unprotect Password:="benjamin"
Sheets("TankCalcs").Unprotect Password:="benjamin"
Sheets("TankCalcs").Range("I22").Value = ""
Sheets("Tank").Range("C13").Value = ""
Sheets("Tank").Range("F56").Value = ""
Sheets("Tank").Range("G56").Value = ""
ChkWP.Enabled = True
ChkSA.Enabled = True
Sheets("Tank").Protect Password:="benjamin"
Sheets("TankCalcs").Protect Password:="benjamin"
Else: Sheets("Tank").Unprotect Password:="benjamin"
Sheets("TankCalcs").Unprotect Password:="benjamin"
Sheets("TankCalcs").Range("I22").Value = "3"
Sheets("Tank").Range("C13").Value = Sheets("TankCalcs").Range("J30")
ChkWP.Enabled = False
ChkSA.Enabled = False
Sheets("Tank").Range("F56").Value = ""
Sheets("Tank").Range("G56").Value = ""
'looks at Total Gal of tank and if equal to or greater than 5000gal
it automatically adds the cost and weight of a manhole
If Sheets("Tank").Range("C7").Value >= "5000" Then
Sheets("Tank").Range("F56").Value =
Sheets("TankCalcs").Range("H2").Value
Sheets("Tank").Range("G56").Value =
Sheets("TankCalcs").Range("I2").Value
End If
Sheets("Tank").Protect Password:="benjamin"
Sheets("TankCalcs").Protect Password:="benjamin"
End If