Formula or VBA for upgrading the grade one/two or Nil subject among five subject with various condition.

kamaruddinjnv

Board Regular
Joined
Mar 14, 2014
Messages
56
I want Fix a formula in D6:D10 for upgrade the grade ( Based on C6:C10) of only one /two subjects or Nil subject acording to no.mentioned in C2 cell. Upgradation will be from lower grade to upper grade. in C=0 then D6:D10 WILL BE SAME AS C6:C10, IF C=1, THEN ONLY ONE SUBJECT WILL BE UPGRADED, which is lowest grade, IF C=2, THEN TWO SUBJECTS GRADE WILL BE UPGRADED FROM LOWEST GRADE. but if in case of tie in Grade among two or three suject then FOLLOWING CONDITION WILL BE APPLIED:
1-Grade will be upgraded for that subject, in which overall marks will be heighest( F6:F10)
2-If overall marks will tie then, Grade will be upgraded for that subject, in which SA marks will be heighest( G6:G10)
3-If SA marks will tie then, Grade will be upgraded for that subject, in which FA marks will be heighest( H6:H10)
4-BUT IF XYZ MARKS LESS THAN 25% IN ANY SUBJECT, THEN E1 GRADE WILL NOT BE UPGRADED IN CONCERNED SUJECT.
5-GRADE WILL BE UPGRADED from E1 to D, D to C2, C2 to C1, C1 to B2, B2 to B1, B1 to A2. A1 and E2 grade will not be upgraded.

<tbody>
</tbody>
2subject upgraded
SUBJECTObt.
GRADE
UPGRADED GRADE**UpgradedTable of Obtained Marks for Upscaling Purpose.
Overall MarksSAFAXYZ
HINDIB2B262.0030.0032.0050.00
ENGLISHB1A2**80.0050.0030.0083.33
MATHSB1B173.0040.0033.0066.67
SCIENCEE1E129.0014.0015.0023.33
SOCIAL SCB1A2**77.0055.0022.0091.67

<tbody>
</tbody>
** One example of upgraded marks mentioned here.

<tbody>
</tbody>
Help: Your a little help save a lot of time of thousands teachers.
for details please see this excel file:(for download pl copy and paste this link to address bar.)
http://files.kamaruddin.webnode.com/200000309-0278503710/quesion%20for%20UPGRADING%20FORMULA.xlsx

<tbody>
</tbody>
 
Last edited:

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Please see this corrected table for this above question:


2 subjects upgraded
SUBJECTObt.
GRADE
UPGRADED GRADE**UpgradedTable of Obtained Marks for Upscaling Purpose.
Row/
COLUMN-

6 HINDI
C

B2
D

B2
EOVERALL MARKS
62.00
SA

30.00
FA

32.00
XYZ

50.00
7 ENGLB1A2**80.0050.0030.0083.33
8 MATHSB1B173.0040.0033.0066.67
9 SCIENE1E129.0014.0015.0023.33
10 S.STB1A2**77.0055.0022.0091.67

<tbody>
</tbody>

** One example of upgraded marks mentioned here.

<tbody>
</tbody>


<tbody>
</tbody>
 
Upvote 0
Hi Kamaruddin,

Here's one option which should work for you. I have used couple of helper columns which you will have to build as well.

1. In Cell K6 write following formula:
=(F6*1000000+G6*10000+H6*100+J6)*(J6>25)
And copy it down to Cell K10.

2. Then create a simple LOOKUP table in Cells N3:O11 as below:


NO
3
GRADEHIGHER GRADE
4
A2A1
5
B1A2
6
B2B1
7
C1B2
8
C2C1
9
DC2
10
E1D
11
E2E2

<colgroup> <col style="WIDTH: 30px; FONT-WEIGHT: bold"> <col style="WIDTH: 68px"> <col style="WIDTH: 87px"></colgroup> <tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


3. Then in Cell D6 write following formula:
=IF($C$2=0,C6,IF(LARGE($K$6:$K$10,$C$2)<=K6,VLOOKUP(C6,$N$3:$O$11,2,0),C6))

And copy it down to D10. You should get what you want :)

If you are not able to follow the comments then let me know I will upload the workbook somewhere and post the link here.
 
Upvote 0
Thanks Mr shrivallabha, but doing this in the upgrade column i.e in D column in place of upgraded grade #NA is showing. It may be my mistake due to lake of my expertness. so please upload the file and give the link.

Thanks.

Kamaruddin.
 
Upvote 0
Dear Sir,

Thanks lot for try this but some problem is still now. perhaps I was unable to clear it. Now I am trying again to explain it:
Following conditions which is mentioned points wise 1-4 only required when lower grade of two subject or one subject will be tie ( same). But it is first condition that grade will be upgraded from lower grade firstly( it will be firstly start from E1,D,C2....) . condition 1-4 is secondary. according to your formula grade is upgrading according to heighest marks of overall firstly ........ . Point -5 only applicable whenever XYZ marks will be below than 25% . whenever it will applicable in that condition E1 grade of concerned subject will not be upgraded. Hope you will understand the matter from my poor english.

<tbody>
</tbody>

Please download this fille for new explanation-

http://files.kamaruddin.webnode.com/200000311-00f0e01e7f/upgrade.xlsx

Thanks

Kamaruddin.
 
Upvote 0
I did not pay attention to all conditions. Guess I forgot my reading glasses :) Your information is quite clear.

I think in the latest example you've made mistakes at couple of places.

1. The maximum upgrades number is 2 and you've upgraded at 3 places.

2. Within B1 grade subjects it is MATHS which should be upgraded it first qualifies along with ENGLISH as highest overall marks in the tied grade and then in SA grade it scores more than ENGLISH and hence qualifies for upgrade.

I am uploading revised workbook, please download and test it.

https://app.box.com/s/uorkzigobdzywrxky9k9
 
Upvote 0
Hi Mr Shrivallabha,

Lot of thanks for your solution. Really appreciate your knowledge of excel. Now it is working according to my requirement. Hope if I will face any problem regarding this formula, I will get help from you again. yes I did mistake to mentioned example of grading at three places instead of two places. After posting I had seen this, but avoiding to upload a another sheet, I had been think you will be able to understand this mistake and you are able to correct it.

I am trying to understand your procedure to solve it, though I could not able to understand your combo number theory, but seeing you easy process I surprise.
Thanks a lot again.

with regards

kamaruddin
 
Upvote 0
Hi Mr Shrivallabha,

Lot of thanks for your solution. Really appreciate your knowledge of excel. Now it is working according to my requirement. Hope if I will face any problem regarding this formula, I will get help from you again. yes I did mistake to mentioned example of grading at three places instead of two places. After posting I had seen this, but avoiding to upload a another sheet, I had been think you will be able to understand this mistake and you are able to correct it.

I am trying to understand your procedure to solve it, though I could not able to understand your combo number theory, but seeing you easy process I surprise.
Thanks a lot again.

with regards

kamaruddin
Great. Thanks for the feedback.

I used a fairly simpler idea which you can maintain quite easily. The combo number is built up in the same sequence as your conditions are. Only grades were non numerical so I converted them to numeric entities using MATCH formula.

So you can see that it is just the numbers you have written are its ingredients I.e. 2 (Numeric grade) 80 (Overall marks) and so on to get something like 280552540.

Once this is done then we just check the number of upgrades applicable. And upgrade those many subjects. Please check Excel help for functions used so as to get the grip of solution. If something is unclear then please ask.
 
Upvote 0
Hi Mr Shrivallabha,
One new problem has occur with this formula- suppose in case of tie in all three column F,G &H, then formula done upgrade the grade of all those subjects and in this situation, condition of C2 is failed. I feel this situation will rarely come but I want in that situation only one or two subject/subjects will be upgraded seeing condition of C2. In that case any one/two (according to C2) will be upgraded among those lowest subjects which will be tie. one example given here.
Remaining other result is fine. Hope I am able to convey the proble to you.
Result wantedIn that situation:
>if C=1 then ONLY ONE subject will be upgrade among any three subjects.
>if C=2 then ONLY TWO subjects will be upgrade among any three subjects.


<colgroup><col><col><col><col><col><col><col span="2"><col><col><col></colgroup><tbody>
</tbody>
Now I am unable to upload file. Hope you can check it by put up any same data in any three subject.

with regards.

kamaruddin
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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