ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Select, find in another book, copy, return and paste (https://www.excelbanter.com/excel-discussion-misc-queries/199026-select-find-another-book-copy-return-paste.html)

Watson[_2_]

Select, find in another book, copy, return and paste
 
Excel 2003

I have multiple catalogue workbooks, all use the same layout. I want to
update the on hand stock in column H for the item numbers I select in
column B. All on hands are in workbook peter1.xls in column G.

I have recorded the steps I would like to do with the macro recorder but
I want this to work with any cell or range I select in B from any of the
workbooks I open.


Sub Find()
'
' Find Macro
' Macro recorded 15/08/2008
'

'
Windows("Beverageware 111 Basic Decorated.xls").Activate
Selection.Copy
Windows("peter1.xls").Activate
Cells.Find(What:="P221558", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Range("G1991").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Beverageware 111 Basic Decorated.xls").Activate
Range("H8").Select
ActiveSheet.Paste
End Sub




I hope this explains what I need.







All times are GMT +1. The time now is 02:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com