0

Provided all the conditions in the code below is met, can anyone provide me with an idea as to why ResultG populates in the excel worksheet but ResultGi does not. I have tried re-arranging and linking various parts of both codes together but to no avail.

Result6 = (23) Result6i = (24)

If Result1 = 19 And ((Result2ai >= 7) And (Result2ai <= 14)) Then
        Result6 = (23)
        Result6i = (24)
        
        If Result1a = 15 And ((Result3a >= 6) And (Result3a <= 10)) Then
                    Result4 = 19
                    Result5i = Result6 - Result4
                        ResultG = Result5i - Range("G2").Value
                        Range("W2").Value = ("ResultG")
                        Range("X2").Value = (" Can Use: [ " & ResultG & " ]")
                        Range("Y2").Value = ("2 Nxt will not be " & ResultG)
                        Range("Z2").Value = (" 19|15|5i ")
 
        
        Result5iii = Result6i - Result4
        ResultGi = Result5iii - Range("G2").Value
                        Range("W3").Value = ("ResultGi")
                        Range("X3").Value = (" Can Use: [ " & ResultGi & " ]")
                        Range("Y3").Value = ("2 Nxt will not be " & ResultGi)
                        Range("Z3").Value = (" 19|15|5ii ")

       End If
    End If
End Sub
braX
  • 11,506
  • 5
  • 20
  • 33
worded
  • 3
  • 2
  • I can't see how this would populate one but not the other. Try replacing `Range().value =` with `Debug.Print` to make sure it's not something with the sheet. – Christofer Weber Sep 16 '22 at 14:19
  • Did as you suggested and is outputting fine in immediate window. Seems problem should be with unsatisfied conditions in the code. Will cross check conditions and try again. Gracias – worded Sep 16 '22 at 16:38

0 Answers0