IF formula based on a value between 2 numbers, and also matching specific criteria

jhainsworth

New Member
Joined
Aug 14, 2019
Messages
2
Hello,

I have a group of employees that have results for various metrics. I want to assign a Score for each of these metrics based on specific values that their result is between. For example, one metric might be quality, and I might have scores 1-5 where 5 is anything greater than 98%, 4 is anything greater than or equal to 94% and less than 98%, 3 is anything greater than or equal to 91% and less than 94% and so on.

Additionally, depending on how long that employee has been working, the values for each score might change. For example the above scores might be for employees that have been here longer than 1 month. Employees that have been here less than 1 month might have the following: 5 is anything greater than 95%, 4 is anything greater than or equal to 90% and less than 95%, and so on.

I track each metric for each employee monthly, and each month I assign them a setting based on how long they've been an employee. So I have one Excel row for July 2019 for Jane Smith who is New Hire Month 1 - Quality, and a 2nd row for August 2019 for Jane Smith who is New Hire Month 2 - Quality.

I'm trying set up an excel sheet for another group to manage, where they have to do as little manual entry as possible. I'd like for them to simply be able to select New Hire Month 1 or Month 2, enter the Quality result for that agent that month, and have a Score field that can look up the appropriate score using the appropriate ranges based on the New Hire Month 1 or Month 2 selection. I'm failing miserably at accomplishing this :) any help is appreciated!
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

jorismoerings

Well-known Member
Joined
Jul 4, 2014
Messages
1,275
Hi,

Try this:

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th><th>I</th><th>J</th><th>K</th><th>L</th><th>M</th><th>N</th><th>O</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;">0</td><td style="text-align: right;;">1</td><td style="text-align: right;;">2</td><td style="text-align: right;;">3</td><td style="text-align: right;;">4</td><td style="text-align: right;;">5</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">Month 1</td><td style="text-align: right;;">0%</td><td style="text-align: right;;">75%</td><td style="text-align: right;;">80%</td><td style="text-align: right;;">85%</td><td style="text-align: right;;">90%</td><td style="text-align: right;;">95%</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">Name</td><td style=";">Month</td><td style=";">Assign</td><td style=";">Metric Result</td><td style=";">Score</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">Month 2</td><td style="text-align: right;;">0%</td><td style="text-align: right;;">85%</td><td style="text-align: right;;">88%</td><td style="text-align: right;;">91%</td><td style="text-align: right;;">94%</td><td style="text-align: right;;">98%</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">Jane Smith</td><td style=";">July</td><td style=";">New Hire Month 1</td><td style="text-align: right;;">84%</td><td style="text-align: right;;">2</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">Jane Smith</td><td style=";">August</td><td style=";">Month 2</td><td style="text-align: right;;">84%</td><td style="text-align: right;;">0</td></tr></tbody></table><p style="width:3,6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">O3</th><td style="text-align:left">=LOOKUP(<font color="Blue">N3,(<font color="Red">INDEX(<font color="Green">$B$2:$G$3,MATCH(<font color="Purple">RIGHT(<font color="Teal">M3,7</font>),$A$2:$A$3,0</font>),0</font>)</font>),$B$1:$G$1</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">O4</th><td style="text-align:left">=LOOKUP(<font color="Blue">N4,(<font color="Red">INDEX(<font color="Green">$B$2:$G$3,MATCH(<font color="Purple">RIGHT(<font color="Teal">M4,7</font>),$A$2:$A$3,0</font>),0</font>)</font>),$B$1:$G$1</font>)</td></tr></tbody></table></td></tr></table><br />
 
Last edited:

jhainsworth

New Member
Joined
Aug 14, 2019
Messages
2
This is exactly what I needed, thank you!

I have one new question now....for one of my metrics (efficiency) a higher score is given for a lower time (example below), so this formula isn't assigning the proper score for this metric. Thoughts on how can I adjust it so that for the majority of my metrics a higher score is given for a higher result, but for this one metric a higher score is given for a lower result?

012345
Month 112:007:006:306:005:305:00
Month 212:006:005:305:004:304:00

<tbody>
</tbody>
 

jorismoerings

Well-known Member
Joined
Jul 4, 2014
Messages
1,275
Hi,

Something like this:
<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th><th>I</th><th>J</th><th>K</th><th>L</th><th>M</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;">0</td><td style="text-align: right;;">1</td><td style="text-align: right;;">2</td><td style="text-align: right;;">3</td><td style="text-align: right;;">4</td><td style="text-align: right;;">5</td><td style="text-align: right;;"></td><td style=";">Name</td><td style=";">Month</td><td style=";">Assign</td><td style=";">Metric Result</td><td style=";">Score</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">Month 1</td><td style="text-align: right;;">0%</td><td style="text-align: right;;">75%</td><td style="text-align: right;;">80%</td><td style="text-align: right;;">85%</td><td style="text-align: right;;">90%</td><td style="text-align: right;;">95%</td><td style="text-align: right;;"></td><td style=";">Jane Smith</td><td style=";">July</td><td style=";">New Hire Month 1</td><td style="text-align: right;;">84%</td><td style="text-align: right;;">2</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">Month 2</td><td style="text-align: right;;">0%</td><td style="text-align: right;;">85%</td><td style="text-align: right;;">88%</td><td style="text-align: right;;">91%</td><td style="text-align: right;;">94%</td><td style="text-align: right;;">98%</td><td style="text-align: right;;"></td><td style=";">Jane Smith</td><td style=";">August</td><td style=";">Month 2</td><td style="text-align: right;;">84%</td><td style="text-align: right;;">0</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style="text-align: right;;"></td><td style="text-align: right;;">5</td><td style="text-align: right;;">4</td><td style="text-align: right;;">3</td><td style="text-align: right;;">2</td><td style="text-align: right;;">1</td><td style="text-align: right;;">0</td><td style="text-align: right;;"></td><td style=";">Name</td><td style=";">Month</td><td style=";">Assign</td><td style=";">Metric Result</td><td style=";">Score</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style=";">Month 1</td><td style="text-align: right;;">00:00</td><td style="text-align: right;;">05:00</td><td style="text-align: right;;">05:30</td><td style="text-align: right;;">06:00</td><td style="text-align: right;;">06:30</td><td style="text-align: right;;">07:00</td><td style="text-align: right;;"></td><td style=";">Jane Smith</td><td style=";">July</td><td style=";">New Hire Month 1</td><td style="text-align: right;;">05:15</td><td style="text-align: right;;">4</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">9</td><td style=";">Month 2</td><td style="text-align: right;;">00:00</td><td style="text-align: right;;">04:00</td><td style="text-align: right;;">04:30</td><td style="text-align: right;;">05:00</td><td style="text-align: right;;">05:30</td><td style="text-align: right;;">06:00</td><td style="text-align: right;;"></td><td style=";">Jane Smith</td><td style=";">August</td><td style=";">Month 2</td><td style="text-align: right;;">06:15</td><td style="text-align: right;;">0</td></tr></tbody></table><p style="width:4,8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet2</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">M2</th><td style="text-align:left">=LOOKUP(<font color="Blue">L2,(<font color="Red">INDEX(<font color="Green">$B$2:$G$3,MATCH(<font color="Purple">RIGHT(<font color="Teal">K2,7</font>),$A$2:$A$3,0</font>),0</font>)</font>),$B$1:$G$1</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">M3</th><td style="text-align:left">=LOOKUP(<font color="Blue">L3,(<font color="Red">INDEX(<font color="Green">$B$2:$G$3,MATCH(<font color="Purple">RIGHT(<font color="Teal">K3,7</font>),$A$2:$A$3,0</font>),0</font>)</font>),$B$1:$G$1</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">M8</th><td style="text-align:left">=LOOKUP(<font color="Blue">L8,(<font color="Red">INDEX(<font color="Green">$B$8:$G$9,MATCH(<font color="Purple">RIGHT(<font color="Teal">K8,7</font>),$A$8:$A$9,0</font>),0</font>)</font>),$B$7:$G$7</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">M9</th><td style="text-align:left">=LOOKUP(<font color="Blue">L9,(<font color="Red">INDEX(<font color="Green">$B$8:$G$9,MATCH(<font color="Purple">RIGHT(<font color="Teal">K9,7</font>),$A$8:$A$9,0</font>),0</font>)</font>),$B$7:$G$7</font>)</td></tr></tbody></table></td></tr></table><br />
 

Watch MrExcel Video

Forum statistics

Threads
1,102,728
Messages
5,488,527
Members
407,643
Latest member
samerf86

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top