|
-
Jun 11th, 2004, 07:46 AM
#1
Thread Starter
Frenzied Member
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 !
-
Jun 11th, 2004, 09:48 AM
#2
Thread Starter
Frenzied Member
OK almost done.
All I need now is the correct Excel syntax for the following :
IF (DJ38=H37 OR DJ38=I37) AND DJ38 <> F41 THEN
5
ELSE
0
ENDIF
Any takers ?
-
Jun 11th, 2004, 09:56 AM
#3
Re: Need help with Excel calculation ....
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
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 11th, 2004, 09:57 AM
#4
do you mean you want this in a cell formula?
if so...
Code:
IF ( AND( OR (DJ38=H37,
DJ38=I37),
DJ38 <> F41)
, 5
, 0)
-
Jun 11th, 2004, 10:05 AM
#5
Originally posted by TheBionicOrange
OK almost done.
All I need now is the correct Excel syntax for the following :
IF (DJ38=H37 OR DJ38=I37) AND DJ38 <> F41 THEN
5
ELSE
0
ENDIF
Any takers ?
Code:
=if(and(or(dj38=h37,dj38=i37),dj38<>f41),5,0)
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 11th, 2004, 01:08 PM
#6
Thread Starter
Frenzied Member
OK thanks for the help guys.
I'm at home now and won't be back in till Monday, so I'll try then.
Thanks again.
-
Jun 15th, 2004, 02:34 AM
#7
Thread Starter
Frenzied Member
Thanks Ecniv ... that worked just fine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|