Displaying Dates

K

Khalil Handal

Hi to all,
Sheet1 has a value in cell G14 represent the years of a date
I want to copy it to sheet3 in th same location G14 but only to display 2
digits (1993 will show as 93) and 2007 will show 07 and 2000 will show 00)

G14 in sheet3 will show nothing if no value is entered in G14 in sheet1

Thanks
 
M

MartinW

Hi Khalil,

If your input in sheet one is numeric then
=IF(Sheet1!G14="","",RIGHT(Sheet1!G14,2))

If your input in sheet one is date then
=IF(Sheet1!G14="","",RIGHT(YEAR(Sheet1!G14),2))

HTH
Martin
 
K

Khalil Handal

Note: Sheet1 containes only numbers: 1992 , 2000 ...
Thanks to both of you. It worked well.
Khalil
 
Top