Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy & Paste Conditional Formatted duplicates w/vba
Excel 2010
I have a large list of names/words with a X - O binary code next to each name/word. The columns with the XO codes is conditional formatted to show duplicates. In this example 1 & 2 are CF highlighted as the O's are accounting for the letter N in both names and just happen to be the same X-O code. In 3 and 4 the O's are accounting for the letter D in both names but are not duplicates codes. (Somewhere else in the list the O is accounting for the O's in both names and they also are not duplicates codes.) 1. XXXO XXXXXO JOHN DRYDEN 2. XXXO XXXXXO JOAN DIDION 3. XXXX OXXOXX JOHN DRYDEN 4. XXXX OXOXXX JOAN DIDION Is there some method using VBA to go through a column and identify the JOHN and JOAN duplicate codes and then copy & paste one of them (code & name) to a fresh column. There could be several "JOHN-JOAN" like duplicates in the column. Something like: Dim i As Interger Dim JohnCode As String Dim JoanCode As String Dim c As Range Dim Coder As Range With Selection For Each c in Range("Coder") If JohnCode = JoanCode then JohnCode.c Resize(1,2).Copy Range("B100").End(xlup).Offset(1,0) End If Next End With I've looked through HELP and fooled around with the FIND-REPLACE feature but CF seems to be immune to 'normal' look-see-copy-paste. Thanks. Regards, Howard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I copy the formatted value and paste as a new value(not the original value with formatting)? | Excel Discussion (Misc queries) | |||
Copy current color of conditional formatted cell | Excel Programming | |||
Conditional Copy/Paste | Excel Programming | |||
Excel 2007: copy/paste formatted cells? | Excel Discussion (Misc queries) | |||
Copy multiple entries and paste without duplicates | Excel Programming |