Link to home
Start Free TrialLog in
Avatar of macone1976
macone1976Flag for United States of America

asked on

Find a value based on criteria

Trying to calculate a score based on criteria that the user inputs.  On sheet 1 user enter Male or Female, their age, and number of PU they did and in Column D I need to calculate the score based on the data from sheet 1.  An example of a Male, 38, and 51 PU's would give a score of 9.4.  It would look under the Male chart, then the age bracket, then find the corresponding number of PU's they did in Column A and give the score.  Attached is an example.
count.xlsx
Avatar of Glenn Ray
Glenn Ray
Flag of United States of America image

Insert this formula below your input cells on Sheet 2:

=OFFSET(Sheet1!$B$3,MATCH(B3,Sheet1!$A$4:$A$104,0),IF(B1="M",0,5)+IF(B2>=70,4,INT(B2/10)-2))

Regards,
-Glenn
Avatar of macone1976

ASKER

Glenn

I tried to paste the formula but it is giving me a result of 0
There seems to be a small flaw in the formula.  I put Female, 16 and 28.  It returns 9.5  when it should be 8.
Cant seem to get it to work.
Here is picture using Glenn's formula in cell B5 on Sheet 2 with your default input.

User generated image
Aww i see, I need it the other way      Gender  Age PU, going across, not up and down like the image.
How do I adjust to make it work the way I need it to.
I made it work in an example workbook.  Please take a look.

-Glenn
EE-Count.xlsx
Well, your original example had the metrics in a single column.  See the attached example workbook for both possible solutions (i.e., in a column and in a row).

Regards,
-Glenn
EE-Count.xlsx
Glenn,

This is a nice job however I still get 9.5 when I use F/16/28 but using the chart on Sheet 1 that shows it should be 8.  Using the criteria given in the example (M/38/51) it comes back correctly.  I was just doing some spot checking when I found the one from my example.
ASKER CERTIFIED SOLUTION
Avatar of Glenn Ray
Glenn Ray
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glenn,  Thank you so much for your help.  That worked perfectly.  I have just one more new question and my project will be finished, similiar to this question but different format.
Glad I could help.  I'll keep an eye out for your followup question.