View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Copy entire row to different worksheet

Keith,

In Cell X6, use a formula like this in X6 of PTR:

=IF(ISERROR(VLOOKUP($A6,'Reference Data'!$A$1:$Z$10000,COLUMN(B1),FALSE)),"",VLOOKUP( $A6,'Reference
Data'!$A$1:$Z$10000,COLUMN(B1),FALSE))

Then copy to the right and down for as many rows and columns as you need. Change the range address
'Reference Data'!$A$1:$Z$10000 to match your data table on reference data...


HTH,
Bernie
MS Excel MVP


"Kcope8302" wrote in message
...
The macro that I am looking for compares column A between 2 different
worksheets(PTR and Reference data). If the Macro finds a match it takes that
row from Reference data worksheet and copies it to the PTR worksheet starting
at column X. There is information from a macro ran before this that
populates PTR. After the initial information I want the information from the
Reference data worksheet to be placed into the PTR worksheet for reporting
purposes.

Example:
Row 6 in PTR and Row 3 in Reference data match(both contain 'CR239492').
Once the match is found the macro takes all of row 3 from Reference data and
pastes it to Row 6 of PTR starting at column X.
Please do provide me as much assistance as possible

Thanks

-Keith-