Same Date in Column A on Mutiple Lines in seperate worksheets [Solved/Closed]

Report
Posts
2
Registration date
Wednesday September 2, 2015
Status
Member
Last seen
September 3, 2015
-
Posts
2673
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 26, 2020
-
Hi,

Not using FILL with copy/paste....Is there a way to create a date range in Column A (IE: 9/1/15) from line 1 going downward when entering multiple lines of data on Column B (sometimes going well past line 9000). Then create a new sheet with the next date range (IE: 9/2/15) , when entering multiple lines of data on Column B. Then a new sheet would have (IE: 9/3/15) and so on & so on..... or a way to change all dates in column A to next day like above?

09/01/15 1:13:10 AM Trigger
09/01/15 1:13:11 AM Stop
09/01/15 1:13:11 AM Start
09/01/15 1:14:11 AM Stop
09/01/15 1:14:11 AM Start
09/01/15 1:40:07 AM Trigger



Thanks
grangeeman

2 replies

Posts
2673
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 26, 2020
446
Hi Grangeeman,

The following code will enter the date present in A1 into column A of the respective row when an entry is made in column B:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("B:B")) Is Nothing Then Exit Sub
Target.Offset(0, -1).Value = Range("A1").Value
End Sub


Implement the code by right-clicking the sheets tab and select View code, then paste the code into the big white field.

When you are ready for the next date:
  • create a new sheet
  • enter the date in A1
  • paste the same code in the new sheet


Best regards,
Trowa
Posts
2
Registration date
Wednesday September 2, 2015
Status
Member
Last seen
September 3, 2015

tried it and it puts the date into all columns when pasting info into column B
Posts
2673
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 26, 2020
446
Hi Grangeeman,

You must have done something different.

Download the following workbook:
http://ge.tt/4Do8vWN2/v/0?c

Here you will find a date in A1. Now enter something anywhere in column B and notice that the date from A1 will be copied to the cell left of the one you entered something in.

Best regards,
Trowa