Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Copying data between duplicated rows

Hello, how can I copy data between rows duplicated in two lists, but
not the data which is actually duplicated? Phew, that's tough to
summarize.

I have two lists, and both have two columns: name and data. The names
are mostly duplicate in both lists. I would like to copy the data
field from the old list to the new list, matching it up with the
proper names.

I've tried Chip Pearson's COUNTIF tricks, AutoFilter and sorting, but
I can't seem to find a solution. Any suggestions? Thanks!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default Copying data between duplicated rows

The following little macro will do it for you. As written, this macro
assumes your new list is in Columns A:B with the names in A and the data in
B. Also, your old list is in Columns E:F with names in E and data in F.
Column C is the destination column and is blank. Come back if you need
more. HTH Otto
Sub OldToNew()
Dim rOldNames As Range
Dim rNewNames As Range
Dim i As Range
Set rNewNames = Range("A3", Range("A" & Rows.Count).End(xlUp))
Set rOldNames = Range("E3", Range("E" & Rows.Count).End(xlUp))
For Each i In rOldNames
If Not rNewNames.Find(What:=i.Value, LookAt:=xlWhole) Is Nothing
Then
rNewNames.Find(What:=i.Value, LookAt:=xlWhole).Offset(,
2).Value = _
i.Offset(, 1).Value
End If
Next i
End Sub
wrote in message
...
Hello, how can I copy data between rows duplicated in two lists, but
not the data which is actually duplicated? Phew, that's tough to
summarize.

I have two lists, and both have two columns: name and data. The names
are mostly duplicate in both lists. I would like to copy the data
field from the old list to the new list, matching it up with the
proper names.

I've tried Chip Pearson's COUNTIF tricks, AutoFilter and sorting, but
I can't seem to find a solution. Any suggestions? Thanks!!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Copying data between duplicated rows

On Apr 12, 5:56 pm, "Otto Moehrbach"
wrote:
The following little macro will do it for you. As written, this macro
assumes your new list is in Columns A:B with the names in A and the data in
B. Also, your old list is in Columns E:F with names in E and data in F.
Column C is the destination column and is blank. Come back if you need
more. HTH Otto
Sub OldToNew()
Dim rOldNames As Range
Dim rNewNames As Range
Dim i As Range
Set rNewNames = Range("A3", Range("A" & Rows.Count).End(xlUp))
Set rOldNames = Range("E3", Range("E" & Rows.Count).End(xlUp))
For Each i In rOldNames
If Not rNewNames.Find(What:=i.Value, LookAt:=xlWhole) Is Nothing
Then
rNewNames.Find(What:=i.Value, LookAt:=xlWhole).Offset(,
2).Value = _
i.Offset(, 1).Value
End If
Next i
End wrote in message

...

Hello, how can I copy data between rows duplicated in two lists, but
not the data which is actually duplicated? Phew, that's tough to
summarize.


I have two lists, and both have two columns: name and data. The names
are mostly duplicate in both lists. I would like to copy the data
field from the old list to the new list, matching it up with the
proper names.


I've tried Chip Pearson's COUNTIF tricks, AutoFilter and sorting, but
I can't seem to find a solution. Any suggestions? Thanks!!


Thanks!! Using .Offset() was my last resort, but it seems simple
enough. But when I started considering VLOOKUP, I knew I was in too
deep. I will try this out, thanks again.
Reply
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
Compare and consolidating duplicated rows Jen Excel Discussion (Misc queries) 24 March 4th 08 08:49 PM
Deleting Rows with data duplicated in 2 columns [email protected] Excel Worksheet Functions 7 April 10th 07 07:18 PM
Duplicated rows cj21 Excel Discussion (Misc queries) 1 August 18th 05 04:14 PM
Duplicated rows cj21 Excel Discussion (Misc queries) 1 July 29th 05 01:55 PM
Delete non duplicated rows cape Excel Discussion (Misc queries) 1 July 8th 05 02:50 AM


All times are GMT +1. The time now is 06:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"