Hi,
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
I have the following formula, I want to amend this formula to add the value of “one” in Cell D83 on same sheet ( which has existing “If function” to add values) if sInp1 value is greater or equal to 1.20 and Same if sInp2 is value is greater or equal to 1.20.
I mean If sInp 1 & sInp2 value are greater than or equal to 1.20 than add one for each value in Cell D83.
Formula –
<o> </o>
Private Sub CommandButton2_Click()
<o> </o>
Dim sInp1 As Double
Dim sInp2 As Double
Dim sInp3 As Double
Dim Cell As Range
<o> </o>
Dim sOut As Range
<o> </o>
On Error Resume Next
sInp1 = Application.InputBox("Enter Length of Linen")
If Not IsNumeric(sInp1) Then Exit Sub
sInp2 = Application.InputBox("Enter Second Length Of Linen")
If Not IsNumeric(sInp2) Then Exit Sub
sInp3 = Application.InputBox("Enter Numbers of Shelf")
If Not IsNumeric(sInp3) Then Exit Sub
<o> </o>
Set sOut = Application.InputBox("Select Output Cell", Type:=8)
If sOut Is Nothing Then Exit Sub
sOut.Value = ((sInp1 + sInp2) - 0.45) * sInp3
End Sub
thanks
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
I have the following formula, I want to amend this formula to add the value of “one” in Cell D83 on same sheet ( which has existing “If function” to add values) if sInp1 value is greater or equal to 1.20 and Same if sInp2 is value is greater or equal to 1.20.
I mean If sInp 1 & sInp2 value are greater than or equal to 1.20 than add one for each value in Cell D83.
Formula –
<o> </o>
Private Sub CommandButton2_Click()
<o> </o>
Dim sInp1 As Double
Dim sInp2 As Double
Dim sInp3 As Double
Dim Cell As Range
<o> </o>
Dim sOut As Range
<o> </o>
On Error Resume Next
sInp1 = Application.InputBox("Enter Length of Linen")
If Not IsNumeric(sInp1) Then Exit Sub
sInp2 = Application.InputBox("Enter Second Length Of Linen")
If Not IsNumeric(sInp2) Then Exit Sub
sInp3 = Application.InputBox("Enter Numbers of Shelf")
If Not IsNumeric(sInp3) Then Exit Sub
<o> </o>
Set sOut = Application.InputBox("Select Output Cell", Type:=8)
If sOut Is Nothing Then Exit Sub
sOut.Value = ((sInp1 + sInp2) - 0.45) * sInp3
End Sub
thanks