Comparing Textual Data producing numerical information

Rameses

Board Regular
Joined
Mar 3, 2010
Messages
137
Hi all

OK I am tracking Students BTEC grades (a UK course) and am going round and round in circles

The Data Range is the same in both columns A&B. This is arrayed order below

Dist*
Dist
Merit
Pass
Fail

Column A is students Targeted Grade and column B is Students current Progress
I want to compare both these columns and in column C want to add in a value to express the difference between their targeted and current grades (therefore showing how much the students are passing or failing their BTEC course)

Some examples are as follows

If A1 = Dist
and B1 = Merit
Then C1 should show -1

A1=Merit
B2 = Fail
C1 should show -2

A1 = Pass
B1 = Dist
C1 should show 2

C range would therefore be from 4 to -4

After I have done this I then want to add conditional formatting to column c but I can do this ok

Please, please help

many thanks

Rameses
 

wigi

Well-known Member
Joined
Jul 10, 2006
Messages
7,944
Hi

In C1:
=MATCH(A1,$S$1:$S$5,0)-MATCH(B1,$S$1:$S$5,0)

S1:S5 has the list of 5 possibilities.
 

Rameses

Board Regular
Joined
Mar 3, 2010
Messages
137
You are fantastic :)

Thankyou so much for that

a) I wonder is there anyway I can put the range into the formula rather than creating an extra column?

Also... I know this is a long shot but...

b) If there is only 1 piece of data entered into either A1 or B1 can it record an "N" into C1

c) And if both A1 and B1 are blank could it record nothing into the cell (But still have the formula applying)

many thanks

Now your greatest fan :)

Rameses
 

wigi

Well-known Member
Joined
Jul 10, 2006
Messages
7,944
a) can be done, but a very bad idea. Maintenance should be as easy as possible, rather than changing formulas.

b) + c)

=IF(A1&B1="","",IF(OR(A1="",B1=""),"N",MATCH(A1,$S$1:$S$5,0)-MATCH(B1,$S$1:$S$5,0)))
 

Rameses

Board Regular
Joined
Mar 3, 2010
Messages
137
Hi there

I am so grateful

I have decided to get rid of some of my older formlas (which work) when tracking other types of grades as those you have provided are so much simplar, shorter and easier to understand and use..!!!!

For a) the data range would never change so would not need any maintainence hence I wanted to include it in the formula...???

But what you have provided wow....hours i have puzzled over this ... it shows theres always an answer for anything!

many thanks

Rameses
:)
 

Forum statistics

Threads
1,081,943
Messages
5,362,268
Members
400,674
Latest member
Thumper007

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top