Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Script/function to extract duplicate entries between two columns?

I have a spreadsheet set up like this

<username1 <real name2 <username2 <real name2
..

I want a way to extract all lines in series <username1 that are
somewhere in <username2 or, converly, are NOT in that series. Actually,
I want to extract both <username1 and <real name1 as one datum, but
that shouldn't be hard.

Is there a thouroughly easy way to do this with a macro (meaning under
4 lines), or should I just import that data into Runtime Revolution,
where I can write a 4 line script to do it.. (but the formating of the
data would take longer..)

Jim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Script/function to extract duplicate entries between two columns?

set cell = Range("A2")
do while not isempty(cell)
res = Application.Match(cell,Columns(3),0)
if not iserror(res) then
cell.Resize(1,2),Copy Destination:=Cells(rows.count,5).end(xlup)(2)
End if
Set cell = cell.offset(1,0)
Loop

remove the "not" to copy non-matches.

or in D2

=if(Countif(C:C,A2)0,A2,"")

and drag fill down the column.

--
Regards,
Tom Ogilvy


Jim Witte wrote in message
...
I have a spreadsheet set up like this

<username1 <real name2 <username2 <real name2
..

I want a way to extract all lines in series <username1 that are
somewhere in <username2 or, converly, are NOT in that series. Actually,
I want to extract both <username1 and <real name1 as one datum, but
that shouldn't be hard.

Is there a thouroughly easy way to do this with a macro (meaning under
4 lines), or should I just import that data into Runtime Revolution,
where I can write a 4 line script to do it.. (but the formating of the
data would take longer..)

Jim



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
script or format to identify duplicate data Jeremy Excel Discussion (Misc queries) 2 April 19th 10 07:25 PM
Marking duplicate entries based on multiple columns Toney Excel Discussion (Misc queries) 5 October 2nd 09 09:27 PM
Indicate Duplicate Entries Across Multiple Columns Cameron Excel Discussion (Misc queries) 6 January 17th 09 12:23 AM
extract duplicate name George Excel Discussion (Misc queries) 8 November 20th 06 07:01 PM
Extract last and next-to-last entries in a range Teri Excel Worksheet Functions 18 June 30th 06 07:29 PM


All times are GMT +1. The time now is 05:21 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"