Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default help with find and copy

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
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
Copy contents of Find (Find and Replace) rob_bob Excel Discussion (Misc queries) 0 March 26th 09 11:01 PM
Find then copy Vegs Excel Worksheet Functions 6 June 21st 06 03:49 PM
Find and copy?? L/P Excel Worksheet Functions 1 January 14th 05 06:29 PM
Find a day and copy Carlitos Excel Programming 1 June 23rd 04 02:12 AM
Find and Copy ? Robert Gillard Excel Programming 1 October 7th 03 02:35 AM


All times are GMT +1. The time now is 04:02 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"