#1   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default excel macro

Trying to write a simple macro to pick a column, go to the last entry and autofill it to the next cell. Then copy that cell and paste it into the next 7 cells. The autofill is for the date to update and then copy the new date to the next 7 cells in that column. The code that i tried is given but VB will not read , mabey ( ) should be [ ] ? Help please.
Sub date2()
'
' date2 Macro
' Macro recorded 2/4/2004 by Husky User
'
Range("B4634").Select
Selection.End(xlDown).Select
i = Selection.End(xlDown).Select
Selection.AutoFill Destination:=Range("B(i):B(i+1)")Type:=xlFillDefau lt
Range("B(i+1)").Select
Selection.Copy
Range("B(i+2):B(i+8").Select
ActiveSheet.Paste
Range("B4637").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Range("B4647:B4648").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default excel macro

Thanks Dave that is useful for the second part i was trying to do, But for the first part of the macro i want to find the last cell in the column and autofill or drag it to the next cell, that way excel can see that it is a date and paste the next date in the cell lower instead of copying the date and pasting the same date in the cell lower.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
passing arguments from an excel macro to a word macro KWE39 Excel Discussion (Misc queries) 1 July 7th 05 03:56 PM


All times are GMT +1. The time now is 12:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"