Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
Can you help me to set this macro up so it works between 2 workbooks vs. just working on the same sheet viewing different columns? Im looking for Sheet1 in Workbook A to look for a Match in Sheet2 Workbook B. Ive filled in the ranges as they would appear in each of the Workbooks. Range(€œE2:E100€) is the range in Workbook A looking to match Range(€œA2€A100) in Workbook B. If match is found, Workbook A Range (€œB2:B100€) would copy cell values to destination Workbook B Range(€œ€C2:C100€). Appreciate any help you can provide. Thanks - Roger Sub TestCopyFormat() Dim Cell As Range Dim Cindex As Integer On Error GoTo errorhandler Application.DisplayAlerts = False With Worksheets("Sheet1") For Each Cell In Range("E2:E100") Cindex = WorksheetFunction.Match(Cell.Text, .Range("A2:A100"), 0) .Range("B2:B100").Cells(Cindex, 1).Copy _ Destination:=Range("C2:C100").Cells(Cindex, 1) Next Cell End With errorhandler: Application.DisplayAlerts = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
quick question | Excel Discussion (Misc queries) | |||
A quick way to edit the formula in check boxes | Excel Discussion (Misc queries) | |||
Quick question about "filtering" macro | Excel Discussion (Misc queries) | |||
Quick Macro question - How to delete two rows then skip one - and repeat | Excel Discussion (Misc queries) | |||
Quick Question | Excel Worksheet Functions |