ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing 4 digits into 2 digit year (https://www.excelbanter.com/excel-programming/278380-changing-4-digits-into-2-digit-year.html)

frankg

changing 4 digits into 2 digit year
 
I have a cell with 2003 as a number and I want another cell to copy it
as 03. Inotherwords I enter 2003 in one cell and and I want it copied
to another cell as 03 (to represent a 2 digit year). Seems simple but
I'm going brain dead today so I'm having trouble. I'd like to do this
without macros or vba.

Excel advice please

Paul B[_7_]

changing 4 digits into 2 digit year
 
Frankg, here is one way with 2003 in A1 =RIGHT(A1,2)

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **

"frankg" wrote in message
...
I have a cell with 2003 as a number and I want another cell to copy it
as 03. Inotherwords I enter 2003 in one cell and and I want it copied
to another cell as 03 (to represent a 2 digit year). Seems simple but
I'm going brain dead today so I'm having trouble. I'd like to do this
without macros or vba.

Excel advice please




frankg

changing 4 digits into 2 digit year
 
On Tue, 30 Sep 2003 13:56:13 -0400, "Paul B" wrote:

Frankg, here is one way with 2003 in A1 =RIGHT(A1,2)



Thanks Paul. It worked perfect for my spreadsheet.

Very much appreciated.

Ron Rosenfeld

changing 4 digits into 2 digit year
 
On Tue, 30 Sep 2003 11:25:37 -0500, frankg wrote:

I have a cell with 2003 as a number and I want another cell to copy it
as 03. Inotherwords I enter 2003 in one cell and and I want it copied
to another cell as 03 (to represent a 2 digit year). Seems simple but
I'm going brain dead today so I'm having trouble. I'd like to do this
without macros or vba.

Excel advice please



If your four digit number is in A1,

=MOD(A1,100)

will give the last two digits. (Actually, it will give the digits in the
rightmost two places, regardless of the length of the number).

Custom format as 00


--ron

Cliff Myers

changing 4 digits into 2 digit year
 
If you enter 2003 in cell B1 , put this in cell C1:
=Right(B1,2) that will then display 03 in cell C1.

"frankg" wrote in message
...
I have a cell with 2003 as a number and I want another cell to copy it
as 03. Inotherwords I enter 2003 in one cell and and I want it copied
to another cell as 03 (to represent a 2 digit year). Seems simple but
I'm going brain dead today so I'm having trouble. I'd like to do this
without macros or vba.

Excel advice please




Ron Rosenfeld

changing 4 digits into 2 digit year
 
On Tue, 30 Sep 2003 11:25:37 -0500, frankg wrote:

I have a cell with 2003 as a number and I want another cell to copy it
as 03. Inotherwords I enter 2003 in one cell and and I want it copied
to another cell as 03 (to represent a 2 digit year). Seems simple but
I'm going brain dead today so I'm having trouble. I'd like to do this
without macros or vba.

Excel advice please



If your four digit number is in A1,

=MOD(A1,100)

will give the last two digits. (Actually, it will give the digits in the
rightmost two places, regardless of the length of the number).

Custom format as 00


--ron


All times are GMT +1. The time now is 07:54 AM.

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