View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elkar Elkar is offline
external usenet poster
 
Posts: 964
Default automatic age range formula

You could use a LOOKUP function. Something like:

=LOOKUP(A1,{0,15,21,26,31,36,66},{"0-14","15-20","21-25","26-30","31-35","36-65","65"})

Change the data to match your actual age ranges.

HTH,
Elkar


"tjb" wrote:

In cell A1, I have a formula giving me a number 31.
In cell B1, I need to enter text saying "30-35"

This formula needs to change based on the content of cell A1. For example,
if A1 said 20, then B1 should read "15-20", if A1 said 67, then B1 should
read "65" and so on.

I know this is possible but I've forgotten the formula. Thanks all!