View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default HELP ON AGE RANGES

I'm trying to use the countif formula to count the number of people
within particular age
ranges (20-29 then 30-39 etc etc) but keep getting errors.


It is always helpful when asking a question in a newsgroup to specify what
errors or error messages you are getting (it can help us to focus on what
might be wrong).


My data is in a column with has a lot of blanks in and one or two
asterisks in (B4-B329)


It would also be helpful to tell us what your data is (dates, actual ages,
something else).


Am I using the correct formula, if not how does the correct formula look?


COUNTIF should work, but without you showing us how you tried to use it, we
can only guess at the problem. Okay, with the admonishments now out of the
way<g, assuming your data is actual ages (19, 28, etc.), try this...

=COUNTIF(B4:B329,"<30")-COUNTIF(B4:B329,"<20")

which will give a count of the number of ages between 20 and 29. Just change
the test numbers for the other age ranges you are interested in.


Rick