View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
plally plally is offline
external usenet poster
 
Posts: 6
Default Return a value if variable is in a range

I have a column that includes a number representing attained age. There are
approximately 21,000 records. I need to find the distribution of ages in
increments of 10. i.e., the number of records betwen 0 and 10, 11 and 20, 21
and 30, etc.

I've tried using an if statement in the following format:
=IF(11<=D2<=20,1,0). If D2 (attained age) is = 11 and is less than 20, give
me 1 as the value, otherwise, return 0. The statement does not seem to be
working properly.

Thanks