text field ms excel

brianpowell
brianpowell used Ask the Experts™
on
q:

I want the last 4 char of a date field in ms excel.

e.g. 1/1/2012  returns 2012.  or 01/1/2012 returns 2012.


restated I want to extract the year from my date field without code.

can anyone help

thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
=year(A1).  A1 being the cell the date is in.

Author

Commented:
ill try it thanks... was thinking in terms of instr.....

Author

Commented:
what does the formatting for A1 need to be:  

bp

Author

Commented:
thanks!
If the date is text =YEAR(DATEVALUE(A1))

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial