I have a multiple IF/And condition below. In the current case I am testing, the value in the offset is 0, so this should return the value "Out of Stock", but is executing the "Then" portion of the IF condition and returning "Get Image".
[vba]'Compares the value below the index ("Parent") value, if it finds it and is a match,
'then look at its ("Child")quantity. If greater than zero, "Get Image"
If cel.Value.Offset(1, 0).Value Like cel.Value & "*" And cel.Offset(0, 3).Value = "found" _
And cel.Offset(1, 12).Value > 0 Then
cel.Offset(1, 3).Value = "Get Image"
'Compares the value below the index ("Parent") value, if it finds it and is a match,
'then look at its ("Child")quantity. If less than 1, then Note: "Out of Stock"
Else
If cel.Value.Offset(1, 0).Value Like cel.Value & "*" And cel.Offset(0, 3).Value = "found" _
And cel.Offset(1, 12).Value < 1 Then
cel.Offset(1, 3).Value = "Out of Stock"
End If
[/vba]
It should evaluate to Positive, Positive, Negative.
Mousing over the part of the expression below in the editor, intellisense gives me the value of "0".
[vba]
cel.Offset(1, 12)
[/vba]