Need help with Excel calculation ....
I need the syntax for the following calculation.
I can never get this right as there always seems to be loads of brackets involved.
Any of you bright sparks out there fancy taking this one on ?
IF J4=P4 AND K4=Q4 THEN
Range("A1").Value = Range("A1").Value + 1
ELSE
IF (J4 > K4 AND P4 > Q4) OR (J4=K4 AND P4=Q4) OR (J4<K4 AND P4<Q4) THEN
Range("A1").Value = Range("A1").Value + 1
ENDIF
ENDIF
Hope thats readable !
Re: Need help with Excel calculation ....
Quote:
Originally posted by TheBionicOrange
IF J4=P4 AND K4=Q4 THEN
Range("A1").Value = Range("A1").Value + 1
ELSE
IF (J4 > K4 AND P4 > Q4) OR (J4=K4 AND P4=Q4) OR (J4<K4 AND P4<Q4) THEN
Range("A1").Value = Range("A1").Value + 1
ENDIF
ENDIF
Hope thats readable !
That makes no sense - where is the formula going??
This is the formula in a4
Code:
=IF(OR(AND(J4=P4,K4=Q4),OR(AND(J4>K4,P4>Q4),AND(J4=K4,P4=Q4),AND(J4<K4,P4<Q4))),1,0)
That puts a 1 or 0 depending.. which you can either count or sum.
Vince