Hi siti
Let's suppose your data is in Columns A and B.
Column B contains your birthdates.
You want to show only those that are born in the year 1962.
Cell B2 contains a date that falls within the year 1962.
Leave cell C1 Blank and in cell C2 put:
=YEAR(B2)=YEAR($B$2)
*Notice the relative and absolute reference of B2.
This should give you a result of TRUE.
Now activate the Advanced Filter and in the "List Range" put: $A$1:$B$200
In the "Criteria Range" put: $C$1:$C$2
Click Ok!
Dave
OzGrid Business Applications
siti,you can avoid the flawed semantics of Dave's formula posted below by using =YEAR(B2)=1962 instead. Rather than comparing your birthdates against a specified birthyear, Dave's formula, =YEAR(B2)=YEAR($B$2) will compare every record of your data list against the 1st record of the same list. This could be problematic if the ordering of the records is ever changed.
If you'd prefer not to use a constant value (e.g., 1962) in your criteria, then use an absolute reference to a cell that's not within your data list range and enter 1962 there.
>you can avoid the flawed semantics of Dave's formula posted below by using =YEAR(B2)=1962 instead
This is getting to be just too much fun!
Year(1962) LOL! Did you even try this?
The signs of desperation. Those lessons are still on offer Mark, but I think we should start with Basic Excel instead.
ROFL
Dave
OzGrid Business Applications
> Year(1962)...
Who wrote that? Dave are you hallucinating?
He he, no, It's the tears of laughter getting in my eyes.
BTW how's the VBA going :o) Those lessons are still on offer marky
Dave
OzGrid Business Applications
That's entertainment! :o)
Dave
OzGrid Business Applications