Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
Range("C:D").EntireColumn.Insert
Range("C1").Value = format(date,"ddd") Range("C2").Value = Date Range("C3:D50").Value = Range("A3:B50").Value makes sense given what you describe. -- Regards, Tom Ogilvy "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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Create a new column"
Sorry I missed this Part! But why do you need to "Create a new column" if your ranges are static "today's day (Mon) in cell C1. "today's date (05/17/04) in cell C2. "Copy and paste what is in column A3:A50 & B3:B50 Unless you mean a new date stamp with each Column after B:, (try to be more specific next time) then use this Sub Dt_And_Copy( Clm = Do While Cells(3, Clm).Value < " Clm = Clm + Loo Cells(1, Clm).Value = Format(Day(Now), "ddd" Cells(2, Clm).Value = Format(Now, "mm/dd/yy" Range("A3:B50").Copy Destination:=Cells(3, Clm End Su ----- wiinc1 wrote: ---- 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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All I meant by new column was that it would paste to the next open column. Sorry for any confusion
Since I have to do this operation on four seperate tabs within a workbook, how does this change the code Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro creation | Excel Worksheet Functions | |||
Macro creation | Excel Worksheet Functions | |||
Creation of macro with an example | Excel Discussion (Misc queries) | |||
Creation of a Generic Macro | Excel Worksheet Functions | |||
Macro Creation | Excel Discussion (Misc queries) |