Hi all,
Below is a sample of Scottish education attainment data. the data is generated by other software and I can't control the output. I just have to try and find formula that will work with the data I get given.
The red column is the output I'm trying to achieve using formula. At first I started writing a SUMPRODUCT() solution thinking I could just combine that with RIGHT() and pick off all the numbers at the end of the "NAT*" cells. But this wouldn't work because pupils in Scottish schools are judges on 3 levels:
How many pupils pass:
5x Level 3 qualifications (5@3)
5x Level 4 qualifications (5@4)
5x Level 5 qualifications (5@5)
So I need help with the formula that will tell me which of the above groups the pupils belong to.
If it isn't possible with Excel formula then I'll write a VBA solution. I am trying to keep this spreadsheet Macro free for as long as i can just now though.
This is how I've designed the formula on paper:
Why am i finding this so difficult? Is it possible?
Is there any way of attaching the wee test Spreadsheet that I am using?
Thanks,
Liam
Below is a sample of Scottish education attainment data. the data is generated by other software and I can't control the output. I just have to try and find formula that will work with the data I get given.
Code:
[TABLE="width: 918"]
<tbody>[TR]
[TD][B]Forename[/B][/TD]
[TD][B]Surname[/B][/TD]
[TD][B](A) Subject Level[/B][/TD]
[TD][B](B) Subject Level[/B][/TD]
[TD][B](C) Subject Level[/B][/TD]
[TD][B](D) Subject Level[/B][/TD]
[TD][B](E) Subject Level[/B][/TD]
[TD][B](F) Subject Level[/B][/TD]
[TD][COLOR=#ff0000][B]Output like…[/B][/COLOR][/TD]
[/TR]
[TR]
[TD]Liam[/TD]
[TD]Smart[/TD]
[TD]NAT3[/TD]
[TD]NAT3[/TD]
[TD]NAT3[/TD]
[TD]NAT4[/TD]
[TD]NAT3[/TD]
[TD]NAT3[/TD]
[TD][COLOR=#ff0000]5@3[/COLOR][/TD]
[/TR]
[TR]
[TD]Will[/TD]
[TD]Smith[/TD]
[TD]NAT5[/TD]
[TD]NAT5[/TD]
[TD]NAT5[/TD]
[TD]*[/TD]
[TD]NAT5[/TD]
[TD]*[/TD]
[TD][COLOR=#ff0000]5@5[/COLOR][/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Jones[/TD]
[TD]NAT3[/TD]
[TD]NAT3[/TD]
[TD]*[/TD]
[TD]NAT3[/TD]
[TD]NAT3[/TD]
[TD]NAT3[/TD]
[TD][COLOR=#ff0000]5@3[/COLOR][/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Russell[/TD]
[TD]*[/TD]
[TD]*[/TD]
[TD]*[/TD]
[TD]NAT3[/TD]
[TD]NAT3[/TD]
[TD]*[/TD]
[TD][COLOR=#ff0000]5@3[/COLOR][/TD]
[/TR]
[TR]
[TD]Maurice[/TD]
[TD]Malpas[/TD]
[TD="align: right"]44[/TD]
[TD]NAT4[/TD]
[TD]*[/TD]
[TD="align: right"]45[/TD]
[TD]*[/TD]
[TD]*[/TD]
[TD][COLOR=#ff0000]5@4[/COLOR][/TD]
[/TR]
[TR]
[TD]Dennis[/TD]
[TD]Taylor[/TD]
[TD]*[/TD]
[TD]NAT4[/TD]
[TD]NAT5[/TD]
[TD]NAT3[/TD]
[TD]*[/TD]
[TD]*[/TD]
[TD][COLOR=#ff0000]5@3[/COLOR][/TD]
[/TR]
</tbody>[/TABLE]
The red column is the output I'm trying to achieve using formula. At first I started writing a SUMPRODUCT() solution thinking I could just combine that with RIGHT() and pick off all the numbers at the end of the "NAT*" cells. But this wouldn't work because pupils in Scottish schools are judges on 3 levels:
How many pupils pass:
5x Level 3 qualifications (5@3)
5x Level 4 qualifications (5@4)
5x Level 5 qualifications (5@5)
So I need help with the formula that will tell me which of the above groups the pupils belong to.
If it isn't possible with Excel formula then I'll write a VBA solution. I am trying to keep this spreadsheet Macro free for as long as i can just now though.
This is how I've designed the formula on paper:
- Search through the range of 6 horizontal adjacent cells looking for all the cells that start "NAT", ignoring all other values as I can't control those
- Add any "NAT" cells into a range/array
- Check the digit to the right of the text "NAT"
- Find the lowest value from step above
- Concatenate it to the string "5@" & ... if "NAT" was found
Why am i finding this so difficult? Is it possible?
Is there any way of attaching the wee test Spreadsheet that I am using?
Thanks,
Liam
Last edited: