IF Question

RussChilds

Active Member
Joined
Jun 8, 2007
Messages
267
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 :)
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Can you post an example of your data - there may be an alternative way to count what you're after
 
Upvote 0
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")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,243
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top