IF Question

Thanks:  0
Likes:  0

1. ## IF Question

Hi,

I'm trying to count GCSE results. I want to count if a pupil has 5 GCSEs (A* - C grades) including Maths & English. Maths is P2 and English is V2.

I'm trying the below formula but it won't work. Can you help?

=IF(AND(OR(P2={"A*","A","B","C"}),OR(V2={"A*","A","B","C"})),IF(SUM(COUNTIF(P2,V2,AB2,AI2,AN2,AT2,AZ2,BF2,BL2,BR2,BX2,CD2,CJ2,CP2,CV2,DB2,DH2,DN2,DT2,DZ2,EF2,EL2,{"A*","A","B","C"}))>=5,"Yes","No"),"No")

Many thanks,
Russ

2. ## IF Question

Can you post an example of your data - there may be an alternative way to count what you're after

3. ## Re: IF Question

Howdy Russ!

OK I have only modified your current formula a bit and I am not making any claims this is the best way to do it but this works:

=IF(AND(OR(P2={"A*","A","B","C"}),OR(V2={"A*","A","B","C"})),IF(SUM(COUNTIF(INDIRECT({"P2","V2","AB2","AI2","AN2","AT2","AZ2","BF2","BL2","BR2","BX2","CD2","CJ2","CP2","CV2","DB2","DH2","DN2","DT2","DZ2","EF2","EL2"}),{"A*";"B";"C"}))>=5,"Yes","No"),"No")

Or this if you may have invalid results beginning with an A (eg 'Absent'):

=IF(AND(OR(P2={"A*","A","B","C"}),OR(V2={"A*","A","B","C"})),IF(SUM(COUNTIF(INDIRECT({"P2","V2","AB2","AI2","AN2","AT2","AZ2","BF2","BL2","BR2","BX2","CD2","CJ2","CP2","CV2","DB2","DH2","DN2","DT2","DZ2","EF2","EL2"}),{"A~*";"A";"B";"C"}))>=5,"Yes","No"),"No")

Thanks!!!

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•