View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JamesT JamesT is offline
external usenet poster
 
Posts: 3
Default Macro to copy/paste


I would not solve this problem with a macro, just with a vlookup. Create a
Vlookup formula for each column of data you want to show up in worksheet B
from worksheet A. Use the first column A as the item that is being looked up
between worksheets since it is already in both worksheets. Once the Vlookup
formulas work correctly in each column use the "$" feature to freeze the
range consistantly and freeze the column that is being looked up. Then copy
the vlookup formulas down the document to complete.


"Lonpuz" wrote:

In worksheet A,I have a range of data beginnning in a2;
A B C D
1 Unit# Client Name Phone# Address
2 119 Fred Wilson 6561578 34 anystreet

In worksheet B, a have a list of data organized the same way;
A B C D
124 119 Fred Wilson 6561578 34 anystreet
125 120 John Smith 6564877 39 Anytown

I need a macro to find the cell containing the unit number from Worksheet A
in column A on Worksheet B, and then select it. Then copy/paste values the
data on Worksheet A (A2:D2 in my example) over to Worksheet B (would be A124
matching unit number 119 in my example).