How to create a row list according with dates
Solved/Closed
ruidelgadoalves
Posts
5
Registration date
Thursday January 26, 2012
Status
Member
Last seen
March 5, 2012
-
Jan 26, 2012 at 04:45 AM
ruidelgadoalves Posts 5 Registration date Thursday January 26, 2012 Status Member Last seen March 5, 2012 - Jan 27, 2012 at 03:11 AM
ruidelgadoalves Posts 5 Registration date Thursday January 26, 2012 Status Member Last seen March 5, 2012 - Jan 27, 2012 at 03:11 AM
Related:
- How to create a row list according with dates
- Create skype account with gmail - Guide
- Mobile number list with name - Guide
- How to change your best friends list on snapchat to 3 - Guide
- Snapchat create account with email - Guide
- Saints row 2 cheats - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jan 26, 2012 at 07:46 AM
Jan 26, 2012 at 07:46 AM
your main data is from A1 to D5 (it can have more rows)
try this macro "test"
try this macro "test"
Sub test() Dim r As Range, c As Range, j As Long, item, begdate Dim r1 As Range, dest As Range Worksheets("sheet2").Cells.Clear With Worksheets("sheet1") Set r = Range(.Range("D1"), .Range("D1").End(xlDown)) For Each c In r j = c.Value item = .Cells(c.Row, "A") Set r1 = .Cells(c.Row, "B") begdate = Mid(r1, 4, 2) & "/" & Left(r1, 2) & "/" & Right(r1, 2) + 0 'MsgBox begdate With Worksheets("sheet2") Set dest = .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) Range(dest, dest.Offset(j - 1, 0)).FormulaArray = item dest.Offset(0, 1) = begdate Range(dest.Offset(0, 1), dest.Offset(j - 1, 1)) _ .DataSeries Rowcol:=xlColumns, Type:=xlChronological, Date:= _ xlDay, Step:=1, Trend:=False End With Next c End With Worksheets("sheet2").Activate Range("a1").Select End Sub
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jan 26, 2012 at 07:47 AM
Jan 26, 2012 at 07:47 AM
the main data is in sheet1 and result in sheet 2
Jan 27, 2012 at 03:11 AM
It works perfectly. I'm not used to VBA macro programing, but I'm going to dissecate your code, line by line to fully understand it.
Many thanks again. It solved me a lot of hours of work.