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- am totally self taught and have this deadline and am not sure what t do. I know what I am asking is a big ask! I recorded this macro and have annotated what I need to change. If yo can also assist in cleaning it up so it is more efficient then tha would be great also. This macro goes at the end of another one which is also posted - and i ugly and ungainly. 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 b 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 t cut and paste the cells from are constant but the row will change a 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 ' i need to perform this action repeatedly until the cell in th databse workbook are empty. end Sub your assistance is greatly appreciate -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Thank You Tom Ogilvy | Excel Worksheet Functions | |||
Thank u Tom Ogilvy | Excel Programming | |||
Tom Ogilvy | Excel Programming | |||
Tom Ogilvy | Excel Programming | |||
Tom Ogilvy | Excel Programming |