structural01
Structural
- Jul 15, 2004
- 51
Hello,
I wrote the following "if statements" in visual basic and referencing them to the same cell in Excel. However, the statement meeting the right condition is being over ride by other statement not meeting the condition I specified. Can someone help? Thanks in advance.
If ((vI157) <= 0.25) And vN149 = 10 Then
c = -0.7
Range("I159").Value = c
b = -0.18
Range("I161").Value = b
End If
If ((Range("I152").Value / Range("I155").Value) <= 0.25) And vN149 = 15 Then
c = -0.5
Range("I159").Value = c
If ((vI157) <= 0.25) And vN149 = 15 Then
b = "N/A"
Range("I161").Value = "N/A"
End If
I wrote the following "if statements" in visual basic and referencing them to the same cell in Excel. However, the statement meeting the right condition is being over ride by other statement not meeting the condition I specified. Can someone help? Thanks in advance.
If ((vI157) <= 0.25) And vN149 = 10 Then
c = -0.7
Range("I159").Value = c
b = -0.18
Range("I161").Value = b
End If
If ((Range("I152").Value / Range("I155").Value) <= 0.25) And vN149 = 15 Then
c = -0.5
Range("I159").Value = c
If ((vI157) <= 0.25) And vN149 = 15 Then
b = "N/A"
Range("I161").Value = "N/A"
End If