+ Reply to Thread
Results 1 to 7 of 7

Selecting specific value within a range

Hybrid View

Rennier Selecting specific value... 11-12-2008, 02:05 PM
JBeaucaire Indicator Score... 11-12-2008, 02:20 PM
NBVC If you arrange your data as... 11-12-2008, 02:27 PM
Rennier Thanks NBVC! 11-12-2008, 02:34 PM
Rennier Thank you! 11-12-2008, 02:36 PM
ChemistB Okay, I probably made it more... 11-12-2008, 02:44 PM
Rennier Appreciated 11-13-2008, 02:33 PM
  1. #1
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Selecting specific value within a range

    Hi there,

    I need assistance with the following problem:

    I have the following matrix-

    Indicator Score Range %
    A 114 + 10%
    B 110.50 to 113.99 9%
    B 106.50 to 110.49 8.5%
    B 105.00 to 106.49 7%
    C 100.50 to 104.99 6%
    C 91.50 to 100.49 5.5%
    C 90.00 to 91.49 5%
    D 80.50 to 89.99 4%
    D 71.50 to 80.49 3.5%
    D 70.00 to 71.49 3%
    E 51.00 to 69.99 2%
    F 40.00 to 50.99 0%
    O 6%

    The percentages may change going forward.
    I have a spreadsheet with Employee details and each employee has a Indicator and a Score.
    I'm battling to get Excel to do a lookup on the Indicator, find the applicable Score Range, see if the individual's Score falls within the range and then inserts the relevant % into a cell in a specific row of each employee.

    If we did not have more than 2000 doing it manualy might have been an option. Also, the Percentages and Score Ranges in the matrix might change a couple of times.

    Anyone able to asssist?

    Thanking you in advance!

    Rennier (South Africa)
    Last edited by VBA Noob; 11-12-2008 at 02:43 PM. Reason: clarity

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Indicator             Score Range           %
    A                     114 +                 10%
    B                     110.50 to 113.99      9%
    B                     106.50 to 110.49      8.5%
    B                     105.00 to 106.49      7%
    C                     100.50 to 104.99      6%
    C                     91.50 to   100.49     5.5%
    C                     90.00 to   91.49      5%
    D                     80.50 to   89.99      4%
    D                     71.50 to   80.49      3.5%
    D                     70.00 to   71.49      3%
    E                     51.00 to   69.99      2%
    F                     40.00 to   50.99      0%
    O                                           6%
    The attached sheet shows a simple VLOOKUP doing what you want. You don't need to describe the range, just the break points, and the data needed to be in descending format. Pretty straightforward.

    Wasn't sure how you wanted to utilize the letter grade indicators since scores are numeric and more accurate that way.
    Attached Files Attached Files
    Last edited by JBeaucaire; 11-12-2008 at 02:23 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you arrange your data as attached... so that the scores are separated from upper scale and lower scale and also listed in ascending order then you can do a simple LOOKUP()

    =LOOKUP(B20,B2:D14)
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Red face Thanks NBVC!

    Your solution really shows me how much I've got to learn. I though the solution would have been much more complex.

    Thank you for your friendly assistance!

    Greetings from sunny SA!

    Rennier

  5. #5
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Talking Thank you!

    Yip, I've got a lot to learn.

    Thank you kind JB!

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Okay, I probably made it more complicated than it needed to be (see attached) but I have the user entering the Indicator and the Score and the spreadsheet telling them if the score matches the indicator. I also used MATCH and INDEX to keep the top to bottom scale.
    With the Table in A16:C28, and indicator entered into E17, Score into F17; the formula to check to see if they are compatable is
    =IF(INDEX($A$16:$A$28,MATCH(F17,$B$16:$B$28,-1),1)=E17,"Yes","No")
    and the formula to get the percent is
    =INDEX($C$16:$C$28,MATCH(F17,$B$16:$B$28,-1),1)
    Attached Files Attached Files
    Last edited by ChemistB; 11-12-2008 at 02:45 PM. Reason: added attachment
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Smile Appreciated

    Thanks for your input ChemistB! I am sure I will be able to use your methodology going forward.

    Chioa!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1