+ Reply to Thread
Results 1 to 6 of 6

Can't lookup scores-file attached- (Marines weren't built to create Excel spreadsheets)

  1. #1
    Registered User
    Join Date
    08-21-2014
    Location
    Maine
    MS-Off Ver
    365
    Posts
    11

    Can't lookup scores-file attached- (Marines weren't built to create Excel spreadsheets)

    I'm new to excel, and I'm afraid I've bitten off more than I can chew. Excel classes weren't given on Paris Island!

    I'm trying to create a program to score a test that I use. The test consists of ten subtests. When a person takes the test, he gets a raw score for each test, so he has ten scores.

    To score the test, I take each raw score and convert it to a scaled score, which is based on the person's age.

    I have a series of tables, one per sheet, that represent the different age groups (e.g., 16-17, 18-19, 20-24, etc.). All the tables are the same, the first column is raw scores, 0-100. Each row is a different subtest, and there are ten subtests. The only difference in the tables is that the scaled scores are different for each age group. None of the age groups overlap. To calculate the score, you find the person's age, and reference the appropriate table to convert the raw score to a scaled score. It sounds so easy as I type it, but it's kicking my a**!

    I have created a formula that will work for the first table (Ages 16-17):
    =IF(AND(B3>=16,B3<=17),LOOKUP(B9,Ages1617[RawScore],'Ages 16-17'!B2:B68))

    EDIT: This formula is located in cell C9 on the Summary Sheet.


    However, I have been unable to add more if statements to this, and so if you're not 16 or 17, I can't score the test. All attempts are met with errors.

    I've read about other commands, such as MATCH, INDEX, INDIRECT, etc., but I'm having trouble applying them to my situation.

    What I would like to do is have it where I can enter the person's age on the Summary sheet I've created. Underneath, I'd like to enter the ten raw scores in one column, and have Excel look up the appropriate scaled score in the other column.

    Thanks in advance for any help you can provide. I'm quite frustrated now, as I've been working on this for many hours. I apologize in advance if this doesn't make sense. Take care, and thanks for your help!
    Attached Files Attached Files
    Last edited by SemperFiDevilDog; 08-21-2014 at 03:17 PM.

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Marines weren't built to create Excel spreadsheets

    Ha ha... I like your thread title but there are rules on this forum as well (just like in the Marines ). The title should contain some clue of the problem that you are posting so that Google can find it. That way it can help people to a better life, long in to the future. Put your current one in parenthesis afterwards if possible, I really like it. Also, a posted sample workbook will look much more attractive to problemsolvers.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Registered User
    Join Date
    08-21-2014
    Location
    Maine
    MS-Off Ver
    365
    Posts
    11

    Re: Can't lookup scores-file attached- (Marines weren't built to create Excel spreadsheets

    UPDATE:

    I found that this formula works:

    =IF(B3<18,LOOKUP(B9,Table1[RawScore],'Ages 16-17'!B2:B68),IF(B3<20,"")

    But when I try to add another LOOKUP command instead of the smiley face, I get an error. Any thoughts?

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Can't lookup scores-file attached- (Marines weren't built to create Excel spreadsheets

    This formula is to the best of my understanding but it does not fit with your results. Take a look and see if I'm on the right track.
    Use the Evaluate Formula button under the Formulas tab to step through the formula.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-21-2014
    Location
    Maine
    MS-Off Ver
    365
    Posts
    11

    Re: Can't lookup scores-file attached- (Marines weren't built to create Excel spreadsheets

    Jacc,

    Thanks for your help! Much more efficient than my caveman method. I'm not sure what you mean by "does not fit with your results." Can you clarify? I'd like to learn your methodology; is there a reference I can use? I don't have the Evaluate Formula option on my version of Excel, as I'm using a Mac. Thanks again for all your help!

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Can't lookup scores-file attached- (Marines weren't built to create Excel spreadsheets

    Glad to hear it works! What I mean by "does not fit with your results" is that there were numbers in the result column from before. I thought maybe those were "manually extracted" numbers to be used as a reference. If not then fine.

    Since you did put all your data in Tables I had to make one version using the Table feature as well. Same thing but the formula is a little bit more compact.

    Is there a reference? Yes and no. The whole internet and especially this forum . Then there are books about formulas from Walkenbach for instance. The built in help in Excel is handy as well. But no, there is nothing for this particular problem.

    Do a lot of Excel excersises and hang around this forum and you will get up to speed. Try each one of the functions I used (INDEX, INDIRECT etc) on their own to get an understanding how they work.
    http://www.excelfunctions.net/Excel-...Functions.html

    In short here is how it works:
    The VLOOKUP is used with the option 1 at the end. This means that it will go through a sorted table until it finds the biggest number that is still smaller than the lookup number. I use that to get the name of the sheet (or table in this version). It's wrapped with an indirect formula which makes Excel look at the result as a name rather than just a textstring. Then the INDEX function which will just give you the result in a table based on "coordinates" (row and column nr). The row number is simply the age offset with a number to fit the table. The column nr I get from ROWS. Note that the first cell reference in ROWS is fixed with $ signs and the second one isn't. That means that it will expand as you copy the formula down, effectively just counting the number of rows the formula have been copied.
    Attached Files Attached Files

+ 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. Macro for comparing two columns and returning those that weren't found
    By kurtwagner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2012, 02:09 PM
  2. How to create a blank document with v-lookup formulas built in
    By welliesk in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-26-2012, 05:42 PM
  3. Now not regonized as a built in Function, in some spreadsheets?
    By Craigm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2006, 12:35 PM
  4. Use An Excel Built-In Function Entirely Within VBA
    By MDW in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2006, 06:10 PM
  5. Excel that has built-in ruler...
    By Myint Soe Oo in forum Excel General
    Replies: 1
    Last Post: 12-22-2005, 12:20 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