Thread: if statement
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
JE McGimpsey
 
Posts: n/a
Default if statement

You haven't explained what the data you have in your sheet is - is it a
birthdate (e.g., an Excel date serial number), a numeric year (e.g., an
integer like 1972), or a text value, like "1972".


If it's a birthdate:

A1: <birthdate
B1: =CHOOSE(DATEDIF(A1,TODAY(),"y")/10+1, "0-9", "10-19", "20-29",
"30-39", "40-49", "50-59", "60-69")


If it's a numeric year:

B1: =CHOOSE((YEAR(TODAY())-A1)/10+1, "0-9", "10-19", "20-29",
"30-39", "40-49", "50-59", "60-69")


In article ,
Sue wrote:

Hi Bob,
It didn't seem to work.

my problem is this:

someone born in year "1972", I need an if statement to calculate that this
would be someone between "30-39"

Unless I was suppose to substitute something the the formula that you gave
me. If so please talk me through it...I'm kinda new at these "if statement".