Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I am asking a lot of questions because I am not sure what I am doing - and not getting answers so I thought i would try and break my questions up:):):) I recorded this macro and have annotated what I need to change. If anyone can also assist in cleaning it up so it is more efficient then that would be great also. Sub Macro1() Range("H5").Select Selection.Copy Windows("MonthlySource.xls").Activate Columns("A:A").Select Selection.Find(What:="BKO001", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Selection.FindNext(After:=ActiveCell).Activate 'that code changes depending on the month so if possible it should be dynamic Rows("323:323").Select 'this row needs to be dynamic depending on the result of the find Selection.Copy Windows("Database v4.xls").Activate ' thiswhole section needs to be dynamic in that the column I have to cut and paste the cells from are constant but the row will change as the db gets bigger Range("A7565").Select ActiveSheet.Paste Range("A7565").Select Application.CutCopyMode = False Selection.Cut Range("E7563").Select ActiveSheet.Paste Range("C7565").Select Selection.Cut Range("A7563").Select ActiveSheet.Paste Range("E7565").Select Selection.Cut ActiveWindow.SmallScroll ToRight:=2 Range("J7563").Select ActiveSheet.Paste Range("F7565").Select Selection.Cut Range("K7563").Select ActiveSheet.Paste ActiveWindow.SmallScroll ToRight:=1 Range("G7565").Select Selection.Cut Range("G7563").Select ActiveSheet.Paste ActiveWindow.SmallScroll ToRight:=3 Range("L7565").Select Selection.Cut ActiveWindow.SmallScroll ToRight:=-4 Range("C7563").Select ActiveSheet.Paste Rows("7565:7565").Select Range("C7565").Activate Selection.ClearContents end Sub your assistance is greatly appreciated --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy contents of Find (Find and Replace) | Excel Discussion (Misc queries) | |||
Find then copy | Excel Worksheet Functions | |||
Find and copy?? | Excel Worksheet Functions | |||
Find a day and copy | Excel Programming | |||
Find and Copy ? | Excel Programming |