index match with multiple criteria

vkorla

New Member
Joined
Dec 12, 2017
Messages
25
Hello! I'd like to create a formula that, given a particular value for "Age" and "Education", returns the mean and standard deviation from another table. The raw data are in the "Raw data" image file attached, and the values for the mean and standard deviation are in the "Mean st dev" image file, also attached.

For example if I need to find the mean and standard deviation of Age = 23, and Education = 6, the correct values that should be returned are:
Mean = 22.93 (because age = 23 is in age group 1)
Standard deviation = 6.87 (because education = 6 is in education group 1)

How can I best achieve this so that I can input any values for age and education to get the correct mean & standard deviation values?

Thanks so much!
 

Attachments

  • Mean st dev.png
    Mean st dev.png
    7.8 KB · Views: 11
  • Raw data.png
    Raw data.png
    7.4 KB · Views: 11

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try this:

Book3
ABCDEFGHIJKL
1
2Age35MeanKK
3AgeAge GroupEducationEd GroupEducation29StDevLL
418111
519121
620131
721141
822151
923161
1024171ED GROUP 1ED GROUP 2
1125281Age GroupAgeMeanSDMeanSD
1226291124AABBCCDD
13272101234EEFFGGHH
14282111344IIJJKKLL
15292122454100200300400
16302132559500600700800
17312142664afjn
18322152769bgko
19332162874chlp
20342172979OOPPQQRR
213531821084SSTTUUVV
223631921189WWXXYYZZ
23373202
24383212
25393222
26403232
27413242
28423252
29433262
30443272
31454282
32464292
33474302
34484
35494
36504
37514
38524
39534
40544
41555
42565
43575
44585
45595
46606
47616
48626
49636
50646
51657
52667
53677
54687
55697
56708
57718
58728
59738
60748
61759
62769
63779
64789
65799
668010
678110
688210
698310
708410
718511
728611
738711
748811
758911
Sheet2
Cell Formulas
RangeFormula
K2K2=INDEX(I$12:L$22,VLOOKUP($H$2,A3:B75,2,0),INT(1.5*(VLOOKUP($H$3,$D$3:$E$33,2,0))))
K3K3=INDEX(I$12:L$22,VLOOKUP($H$2,A4:B76,2,0),INT(2*(VLOOKUP($H$3,$D$3:$E$33,2,0))))
 
Upvote 1
Solution
This is perfect, thanks so much Leo Skywalker! Question, why are you using the INT function?
 
Upvote 0
This is perfect, thanks so much Leo Skywalker!
Glad to help!, if the post is the solution, please mark it as solved.

why are you using the INT function?

in K1, It's just a way to convert education type 1 and 2 to 1 and 3, to select the appropriate colums for the VLOOKUP.
int(1x1.5)=1
int(2x1.5)=3
There are other ways to get the same result, for example:
2n-1 then:
(1x2)-1=1
(2x2)-1=3

In K2, it's not needed,
1x2=2
2x2=4 they are already intergers, I just didn't delete for lazyness.
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top