Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
if statement
I need to flag ee who are between the ages of 20-29, 30-39, 40-49, 50-59, and
60-69 what would the formual look like just using years eg born between 1976 and 1967 etc... Thank you hopeless |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
if statement
=CHOOSE(INT(I4/10),"","20-29","30-39","40-49","50-59","60-69")
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "Sue" wrote in message ... I need to flag ee who are between the ages of 20-29, 30-39, 40-49, 50-59, and 60-69 what would the formual look like just using years eg born between 1976 and 1967 etc... Thank you hopeless |
#3
Posted to microsoft.public.excel.newusers
|
|||
|
|||
if statement
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". Thank you Sue "Bob Phillips" wrote: =CHOOSE(INT(I4/10),"","20-29","30-39","40-49","50-59","60-69") -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Sue" wrote in message ... I need to flag ee who are between the ages of 20-29, 30-39, 40-49, 50-59, and 60-69 what would the formual look like just using years eg born between 1976 and 1967 etc... Thank you hopeless |
#4
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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". |
#5
Posted to microsoft.public.excel.newusers
|
|||
|
|||
if statement
Thank you sorry if I wasn't clear the first time.
I am using the numeric year. What does "totday" refer to? I'm guessing "Year" means 2006 (if I am trying to calculate as of this year) Thank you again Susan "JE McGimpsey" wrote: 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". |
#6
Posted to microsoft.public.excel.newusers
|
|||
|
|||
if statement
TODAY() (not totday). From XL Help ("TODAY"):
TODAY Returns the serial number of the current date. For YEAR(), from XL Help ("YEAR"): YEAR Returns the year corresponding to a date. The year is returned as an integer in the range 1900-9999. In article , Sue wrote: What does "totday" refer to? I'm guessing "Year" means 2006 (if I am trying to calculate as of this year) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SET statement tutorial | Excel Discussion (Misc queries) | |||
If Statement linked to cell with VLOOKUP problem - getting wrong v | Excel Worksheet Functions | |||
Long IF Statement | Excel Discussion (Misc queries) | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions |