LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 226
Default Quick Question - Edit Macro

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
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
quick question Fady Excel Discussion (Misc queries) 7 February 23rd 08 04:59 AM
A quick way to edit the formula in check boxes Plum Excel Discussion (Misc queries) 1 August 8th 07 01:10 PM
Quick question about "filtering" macro johannes Excel Discussion (Misc queries) 2 January 1st 07 02:53 PM
Quick Macro question - How to delete two rows then skip one - and repeat David Smithz Excel Discussion (Misc queries) 3 March 3rd 06 02:58 PM
Quick Question Nikki Excel Worksheet Functions 4 January 31st 06 02:51 PM


All times are GMT +1. The time now is 03:12 AM.

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"