RWomanizer,
How many groups do you have?
Can this work for you?:
19 =IF(A1>=56,"56-60",IF(A1>=51,"51-55",IF(A1>=46,"46-50",IF(A1>=41,"41-45",IF(A1>=36,"36-40",IF(A1>=31,"31-35",IF(A1>=26,"26-30","18-25")))))))
26 =IF(A2>=56,"56-60",IF(A2>=51,"51-55",IF(A2>=46,"46-50",IF(A2>=41,"41-45",IF(A2>=36,"36-40",IF(A2>=31,"31-35",IF(A2>=26,"26-30","18-25")))))))
33 =IF(A3>=56,"56-60",IF(A3>=51,"51-55",IF(A3>=46,"46-50",IF(A3>=41,"41-45",IF(A3>=36,"36-40",IF(A3>=31,"31-35",IF(A3>=26,"26-30","18-25")))))))
37 =IF(A4>=56,"56-60",IF(A4>=51,"51-55",IF(A4>=46,"46-50",IF(A4>=41,"41-45",IF(A4>=36,"36-40",IF(A4>=31,"31-35",IF(A4>=26,"26-30","18-25")))))))
42 =IF(A5>=56,"56-60",IF(A5>=51,"51-55",IF(A5>=46,"46-50",IF(A5>=41,"41-45",IF(A5>=36,"36-40",IF(A5>=31,"31-35",IF(A5>=26,"26-30","18-25")))))))
49 =IF(A6>=56,"56-60",IF(A6>=51,"51-55",IF(A6>=46,"46-50",IF(A6>=41,"41-45",IF(A6>=36,"36-40",IF(A6>=31,"31-35",IF(A6>=26,"26-30","18-25")))))))
55 =IF(A7>=56,"56-60",IF(A7>=51,"51-55",IF(A7>=46,"46-50",IF(A7>=41,"41-45",IF(A7>=36,"36-40",IF(A7>=31,"31-35",IF(A7>=26,"26-30","18-25")))))))
56 =IF(A8>=56,"56-60",IF(A8>=51,"51-55",IF(A8>=46,"46-50",IF(A8>=41,"41-45",IF(A8>=36,"36-40",IF(A8>=31,"31-35",IF(A8>=26,"26-30","18-25")))))))
Best regards,
Trowa
some thing like this
This is based on assumption that
1. Age for range starts from Cell A2 on sheet2
2. Age are sorted in ascending order
3. if age that is being looked up, is less than the minimum age, then you want to return "<" (minimum age)
4. if age that is being looked up, is more or equal to the maximum age, then you want to return ">" (maximum age)
In order to use the function, you would make a call like
=getAgeRange(a2)