ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   date format and the RIGHT function (https://www.excelbanter.com/excel-worksheet-functions/61024-date-format-right-function.html)

Rich Hayes

date format and the RIGHT function
 
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



All times are GMT +1. The time now is 06:50 PM.

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