Make Two Results within Same Block Populate Together

36 Views Asked by At

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
0

There are 0 best solutions below