Vertical to Horizontal & Eliminate Duplication
Hi
Im working with Excel 2007 I have a list of names in A1:A10. Some of the names are exist more than once. I want to copy he list to C1:L1 and eliminate duplication in one action Thanx |
Vertical to Horizontal & Eliminate Duplication
I hope it will work even in 2007. If you are free as to the space to the
right from your new header use the macro: Sub SetHeaderFromTheList() Dim DummyRange As Range Range("A1").EntireRow.Insert Set DummyRange = Range("B1:B10") ' (auxiliary column range located wherever, will be cleared) Range("A1") = "Dummy header" Range("A1:A11").AdvancedFilter Action:=xlFilterCopy, _ CopyToRange:=DummyRange, Unique:=True Range("A1").EntireRow.Delete DummyRange.Copy Range("C1").PasteSpecial Transpose:=True DummyRange.Clear End Sub -- Petr Bezucha "NirOrtal" wrote: Hi Im working with Excel 2007 I have a list of names in A1:A10. Some of the names are exist more than once. I want to copy he list to C1:L1 and eliminate duplication in one action Thanx |
All times are GMT +1. The time now is 09:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com