+ Reply to Thread
Results 1 to 9 of 9

Comparing to Range

  1. #1
    Registered User
    Join Date
    02-15-2016
    Location
    Indiana
    MS-Off Ver
    2010
    Posts
    8

    Comparing to Range

    I’m totally out of it this morning, and trying to look it up really hasn’t worked for me yet; so I have an excel question for you.the answer.

    So what I want to do is…

    Compare two variables: Last Grade Completed and Educational Functioning level

    The Problem


    Last Grade completed is a single value (like grade 12) while EFL is a category that I need to transform into a number; however, EFLs do not translate neatly into grades, but rather grade ranges (like 11 through 12 or 1 through 1.9).

    Ultimately, I would like Excel to check the Last Grade Completed Column and compare it to my translated Grade Ranges, then give me one of three outputs that correspond to whether the value in Last Grade Completed falls into the grade range, falls below the grade range, or is above the grade range (Expected, Above, and Below).

    The later has the problem of getting the right IF statements; however, I am also having a problem with actually getting Excel to recognize that I am inputting a number range into a single cell. Is this even possible?

    Any Advice is appreciated.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2506 (Windows 11 Home 24H2 64-bit)
    Posts
    91,412

    Re: Comparing to Range

    If you attach a sample workbook, it will be much easier to advise.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-15-2016
    Location
    Indiana
    MS-Off Ver
    2010
    Posts
    8

    Re: Comparing to Range

    Unfortunately, I work for a government agency and the data itself is confidential (even if I do not provide a UID). Plus, it's a huge data set almost at the limits of Excel's capabilities. I considered trying to do this in SPSS, but it seemed like it would be much easier and less time consuming to transform this data in this particular instance.

    I will see if I can make something up quickly that mimics what I'm looking at.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2506 (Windows 11 Home 24H2 64-bit)
    Posts
    91,412

    Re: Comparing to Range

    Yes - a mock-up without sensitive data is the way to go.

  5. #5
    Registered User
    Join Date
    02-15-2016
    Location
    Indiana
    MS-Off Ver
    2010
    Posts
    8
    Quote Originally Posted by AliGW View Post
    Yes - a mock-up without sensitive data is the way to go.
    See attached photos.

    Columns
    A: Last Grade Completed (numerical value between one and 12)
    B: EFL Code (formal federal EFL category a student falls into as measured by a test)
    C: EFL Grade Range (the grade range that corresponds to the EFL category)
    D: EFL/LG Comp

    Column D is where I'd like to record whether or not the numerical value in column A:
    0, falls within the range in column C
    1, is above the range in column C
    -1, is below the range in column C
    Attached Images Attached Images

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2506 (Windows 11 Home 24H2 64-bit)
    Posts
    91,412

    Re: Comparing to Range

    If you put the extremes of the grade ranges into separate columns, this would be easy, but in reality, not terribly practical. I think a solution with lookup tables would make more sense.

  7. #7
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Comparing to Range

    may be below in D2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and drag down


    you need to remove spaces beween > and < signs as website does not allow to post them without spaces sometimes
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2506 (Windows 11 Home 24H2 64-bit)
    Posts
    91,412

    Re: Comparing to Range

    Create this lookup table somewhere on the sheet:

    ABE Int Low 4 5.9
    ABE Int High 6 8.9
    ABE Low 9 10.9
    ABE High 11 12

    Use this formula in D2 and copy down:

    =IF(A2>VLOOKUP(B2,$H$1:$J$4,3),1,IF(B2>VLOOKUP(B2,$H$1:$J$4,2),-1,0))

    where $H$1:$J$4 is the location of the lookup table.

  9. #9
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Comparing to Range

    @ Ali, grades in column A and grade range in column C are changing constatly

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 08-04-2014, 04:48 AM
  2. Comparing values in a range
    By leslieharris in forum Excel General
    Replies: 2
    Last Post: 08-02-2012, 01:53 AM
  3. Comparing a cell with a range
    By marcmade in forum Excel General
    Replies: 6
    Last Post: 08-21-2009, 08:42 AM
  4. comparing range
    By walid66 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-03-2008, 08:43 PM
  5. Looping through rows in range AND comparing range cells
    By Damask in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-16-2006, 10:30 PM
  6. Comparing One Range and Adding Another
    By statusquo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-08-2005, 09:54 PM
  7. Comparing a Range of Values
    By jpx in forum Excel General
    Replies: 4
    Last Post: 11-22-2005, 06:30 PM

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