Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Idea
I am trying to create a macro that will do the following
Create a new colum Label the new column with today's day (Mon) in cell C1 Label the same column with today's date (05/17/04) in cell C2 Copy and paste what is in column A3:A50 & B3:B50 into C3:C50 & D3:D50 Copy and paste values what is cells A3:A50 & B3:B50 into those same cells The problem I am running into is Each time I run this macro I don't want it to overwrite the old data. For the next time I ran the macro I would want the new information posted to cells E3:E50 & F3:F50 I appreciate the help Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Idea
Try this Dim cNextCol As Long cNextCol = Cells(3, Columns.Count).End(xlToLeft).Column + 1 Cells(1, cNextCol).Value = Format(Date, "ddd") Cells(2, cNextCol).Value = Format(Date, "dd/mm/yy") Range(Cells(3, cNextCol - 2), Cells(50, cNextCol - 1)).Copy Cells(3, cNextCol) -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "wiinc1" wrote in message ... I am trying to create a macro that will do the following: Create a new column Label the new column with today's day (Mon) in cell C1. Label the same column with today's date (05/17/04) in cell C2. Copy and paste what is in column A3:A50 & B3:B50 into C3:C50 & D3:D50. Copy and paste values what is cells A3:A50 & B3:B50 into those same cells. The problem I am running into is: Each time I run this macro I don't want it to overwrite the old data. For the next time I ran the macro I would want the new information posted to cells E3:E50 & F3:F50. I appreciate the help. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help!! No idea where to go next... | Excel Discussion (Misc queries) | |||
I've no idea how to do this. :( | Excel Worksheet Functions | |||
any idea? | Links and Linking in Excel | |||
any idea?? | Excel Worksheet Functions | |||
Help Please. No Idea what to look for or how to do this | Excel Discussion (Misc queries) |