Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hello and thank you all in advance.
Is there a way to insert a new column into a spreadsheet every day and enter the new date in the first column, then move the rest down? So for instance i have my heading in rows 1 and 2. then freeze panes and my date for each day in columns 3, 4, 5 and so on. What i want it to do is every day when i open it, it moves all the data down one row and start a new row at line 3 for that days data. Is there a nifty bit of code that could do this please? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
kardifflad wrote:
Is there a way to insert a new column into a spreadsheet every day and enter the new date in the first column, then move the rest down? So for instance i have my heading in rows 1 and 2. then freeze panes and my date for each day in columns 3, 4, 5 and so on. What i want it to do is every day when i open it, it moves all the data down one row and start a new row at line 3 for that days data. Is there a nifty bit of code that could do this please? You could do something like this: Sub addTodayRow() If Cells(3, 1).Value < Date Then Rows("3:3").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Cells(3, 1).Value = Date End If End Sub Change "1" in "Cells(3, 1)" to point at the column containing the dates. Alternately, you could put that in the workbook's Workbook_Open event so it happens every time the workbook is opened. -- Well, **** YOU MR. BEAR!!! You speak lies!!! LIIIIES!!! |
#3
![]() |
|||
|
|||
![]()
thankyou. thats works perfectly
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert new Worksheet with name, and insert the sheet into itsalphabetical / numerical location | Excel Programming | |||
insert row / insert column command buttons | Excel Worksheet Functions | |||
Macro to insert copy and insert formulas only to next blank row | Excel Programming | |||
Can I auto insert a worksheet when I insert a value in a cell. | Excel Worksheet Functions | |||
Insert cell/format/text/fontsize and auto insert into header? | Excel Programming |