View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rich Hayes
 
Posts: n/a
Default date format and the RIGHT function

Thanks for your help. Relaly appreciate it!



"JE McGimpsey" wrote:

One way:

A2: =A1

Format A2 using

Format/Cells/Number/Custom yy

And copy across.

Or, if you'd rather have A2 as a text value:

A2: =TEXT(A1,"yy")


In article ,
"Rich Hayes" wrote:

I have in sheet 1, cell A1 a date which says Jun-2005 (the cell format is
mmm-yy and this date is linked to another diff sheet)

Because the date in cell A1 will change I have driven cell B1 from this cell
with the formula:

=DATE(YEAR(A1),Month(A1)+1,1)

This therefore returns the date Jul-2005

and cell C1 returns Aug-2005 etc etc.

In sheet 2,

Cell A1 = 'Sheet 1'!A1 which returns Jun-2005
Cell B1 = 'Sheet 1'!B1 which returns Jul-2005

Now the issue I have is the next step.

In cell A2, i'm trying to do a formula that will return just '05' therefore
I use the formula:

cell A2 =RIGHT(A1,2) which returns '05'

In cell B2 though, i use the same formula;

cell B2 =RIGHT(B1,2) but it returns '34' regardless of cell format.

Is there a way to make sure this returns '05' as well?

Thanks for your help

Regards

Rich