ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   year cant change (https://www.excelbanter.com/excel-worksheet-functions/450109-year-cant-change.html)

[email protected]

year cant change
 
hi
i want to create this format for year-
2001-02
2002-03
2003-04

.............
but when i enter 2001-02 and drag-in it give me this result-
2001-02
2001-03
2001-04
............


is any option to create format i need!!!! thanx

Claus Busch

year cant change
 
Hi,

Am Wed, 28 May 2014 01:38:09 -0700 (PDT) schrieb
:

i want to create this format for year-
2001-02
2002-03
2003-04


if you have dates in columns A then try:
=YEAR(A1)&TEXT(ROW(A2),"-00")

else write into the first row:
=2001&TEXT(ROW(A2),"-00")


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

ataur rahman rony

year cant change
 
On Wednesday, May 28, 2014 2:45:27 PM UTC+6, Claus Busch wrote:
Hi,



Am Wed, 28 May 2014 01:38:09 -0700 (PDT) schrieb

:



i want to create this format for year-


2001-02


2002-03


2003-04




if you have dates in columns A then try:

=YEAR(A1)&TEXT(ROW(A2),"-00")



else write into the first row:

=2001&TEXT(ROW(A2),"-00")





Regards

Claus B.

--

Vista Ultimate / Windows7

Office 2007 Ultimate / 2010 Professional


thnx dear...
the thing is i have no columns or rows for date and year.. i just want this as a shortcut...suppose when we write 2001 and press cntrl key and drag-in...then its shown 2001.2002,,2003......
is there is any solution that i write 2001-02,and drag in then its shown 2002-03,2003-04..........thnx.

Auric__

year cant change
 
ataurrahman.acca wrote:

i want to create this format for year-
2001-02
2002-03
2003-04

............
but when i enter 2001-02 and drag-in it give me this result-
2001-02
2001-03
2001-04
...........


is any option to create format i need!!!! thanx


Not with just dragging like that. You need to use a formula, as Claus pointed
out, or else write some code in VBA to handle it.

--
Sweet little words, unlike nothing I have heard.


All times are GMT +1. The time now is 11:46 AM.

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