ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to use a right formula on a date-format (https://www.excelbanter.com/excel-worksheet-functions/123392-how-use-right-formula-date-format.html)

Heine

How to use a right formula on a date-format
 
Hi everybody,

My problem is this. I have a lot of cells containing dates 06-06-2006
etc. They are in a date format. I want the next column to only return
the year i.e. 2006 in the above exampel. I tried the right formula -
but that only returns the corresponding number (corresponding to the
date) - any ideas?

Regards
Heine


Gary''s Student

How to use a right formula on a date-format
 
Use =YEAR(A1) rather than =RIGHT(A1,4). If you want to use RIGHT then you
must also use TEXT.
--
Gary's Student


"Heine" wrote:

Hi everybody,

My problem is this. I have a lot of cells containing dates 06-06-2006
etc. They are in a date format. I want the next column to only return
the year i.e. 2006 in the above exampel. I tried the right formula -
but that only returns the corresponding number (corresponding to the
date) - any ideas?

Regards
Heine



Heine

How to use a right formula on a date-format
 
Thanks - much better idea. Works like a charm.

Best regards

Heine
Gary''s Student wrote:
Use =YEAR(A1) rather than =RIGHT(A1,4). If you want to use RIGHT then you
must also use TEXT.
--
Gary's Student


"Heine" wrote:

Hi everybody,

My problem is this. I have a lot of cells containing dates 06-06-2006
etc. They are in a date format. I want the next column to only return
the year i.e. 2006 in the above exampel. I tried the right formula -
but that only returns the corresponding number (corresponding to the
date) - any ideas?

Regards
Heine




Gary''s Student

How to use a right formula on a date-format
 
You are very welcome!

The alternative is:
=RIGHT(TEXT(A1,"mm/dd/yyyy"),4)
--
Gary's Student


"Heine" wrote:

Thanks - much better idea. Works like a charm.

Best regards

Heine
Gary''s Student wrote:
Use =YEAR(A1) rather than =RIGHT(A1,4). If you want to use RIGHT then you
must also use TEXT.
--
Gary's Student


"Heine" wrote:

Hi everybody,

My problem is this. I have a lot of cells containing dates 06-06-2006
etc. They are in a date format. I want the next column to only return
the year i.e. 2006 in the above exampel. I tried the right formula -
but that only returns the corresponding number (corresponding to the
date) - any ideas?

Regards
Heine





David Biddulph

How to use a right formula on a date-format
 
And that is presumably just the same as =TEXT(A1,"yyyy") ?
--
David Biddulph

"Gary''s Student" wrote in message
...
You are very welcome!

The alternative is:
=RIGHT(TEXT(A1,"mm/dd/yyyy"),4)
--
Gary's Student


"Heine" wrote:

Thanks - much better idea. Works like a charm.

Best regards

Heine


Gary''s Student wrote:
Use =YEAR(A1) rather than =RIGHT(A1,4). If you want to use RIGHT then
you
must also use TEXT.
--
Gary's Student


"Heine" wrote:

Hi everybody,

My problem is this. I have a lot of cells containing dates 06-06-2006
etc. They are in a date format. I want the next column to only return
the year i.e. 2006 in the above exampel. I tried the right formula -
but that only returns the corresponding number (corresponding to the
date) - any ideas?

Regards
Heine








All times are GMT +1. The time now is 08:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com