#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Dates in Excel

Hi,

i have a worksheet, where Column A is formatted for mmm-yy
What i would like to be able to do is to add a row at R3 and have Column A
automatically increment to the next month. Eg - if A3 - Aug-07 and I insert
a new Row 3, this will have an A3 of Sept-07 and all other rows will move
one row down?

Is this possible please

thanks
A


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Dates in Excel

Alexey,

There is no way that I know of of capturing the inserting of a row. The
onlything that I can suggest it to have an event macro run when you fill in
the last cell - say K3.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim ActionCell As String

ActionCell = Target.Address
If Not ActionCell = "$K$3" Then
Exit Sub
End If
Debug.Print "S"
Rows("3:3").Insert Shift:=xlDown
Range("A3").FormulaR1C1 =
"=DATE(YEAR(R[+1]C),MONTH(R[+1]C)+1,DAY(R[+1]C))"
End Sub

Post bck if you need more help.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Alexey" wrote in message
...
Hi,

i have a worksheet, where Column A is formatted for mmm-yy
What i would like to be able to do is to add a row at R3 and have Column A
automatically increment to the next month. Eg - if A3 - Aug-07 and I
insert a new Row 3, this will have an A3 of Sept-07 and all other rows
will move one row down?

Is this possible please

thanks
A







  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Dates in Excel

Thanks Sandy

Alex

"Sandy Mann" wrote in message
...
Alexey,

There is no way that I know of of capturing the inserting of a row. The
onlything that I can suggest it to have an event macro run when you fill
in
the last cell - say K3.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim ActionCell As String

ActionCell = Target.Address
If Not ActionCell = "$K$3" Then
Exit Sub
End If
Debug.Print "S"
Rows("3:3").Insert Shift:=xlDown
Range("A3").FormulaR1C1 =
"=DATE(YEAR(R[+1]C),MONTH(R[+1]C)+1,DAY(R[+1]C))"
End Sub

Post bck if you need more help.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Alexey" wrote in message
...
Hi,

i have a worksheet, where Column A is formatted for mmm-yy
What i would like to be able to do is to add a row at R3 and have Column
A
automatically increment to the next month. Eg - if A3 - Aug-07 and I
insert a new Row 3, this will have an A3 of Sept-07 and all other rows
will move one row down?

Is this possible please

thanks
A









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel not recognizing dates as dates lawson Excel Discussion (Misc queries) 1 June 26th 07 04:39 PM
how do I sort a column of random dates into Consecutive dates Rob Gibson Excel Worksheet Functions 2 June 12th 07 05:10 AM
Identifying unique dates in a range of cells containing dates... cdavidson Excel Discussion (Misc queries) 4 October 13th 06 03:30 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
How do I get the dates on an excel chart to stay as dates instead. Rani Charts and Charting in Excel 1 September 20th 05 05:56 PM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"