Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
This is sample data set: A B C 123 112 146 234 123 567 345 134 345 456 156 322 567 456 678 789 I want to end up with: A B C 123 x 234 x 345 x x 456 x x 678 x 789 x 112 x 134 x 156 x 146 x 567 x x 322 x Please help. Does anyone know of a tool that will do this? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Uzytkownik napisal w wiadomosci ps.com... Hi This is sample data set: A B C 123 112 146 234 123 567 345 134 345 456 156 322 567 456 678 789 I want to end up with: A B C 123 x 234 x 345 x x 456 x x 678 x 789 x 112 x 134 x 156 x 146 x 567 x x 322 x Please help. Does anyone know of a tool that will do this? try Sub x() Dim zakres As Range, kom As Range Dim zakladka As Worksheet Dim tablica() As Variant Dim i As Integer, j As Integer, w As Integer i = 1 Set zakres = Selection For Each kom In zakres ReDim Preserve tablica(i) tablica(i) = kom.Value i = i + 1 Next kom w = 1 For j = 1 To UBound(tablica) If WorksheetFunction.CountIf(Columns(5), tablica(j)) = 0 Then Cells(w, 5).Value = tablica(j) Cells(w, 6).Value = WorksheetFunction.Rept("x", WorksheetFunction.CountIf(Selection, tablica(j))) w = w + 1 End If Next j End Sub it works on selection and inset the list in column E & F - change it to your needs mcg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mulitiple Count of occurrences in different columns | Excel Worksheet Functions | |||
merge columns into single report - macro needed | Excel Discussion (Misc queries) | |||
How to count occurrences where 2 columns are required to be true? | Excel Worksheet Functions | |||
Sum Count of Single Criteria in Multiple Non-Adjacent columns | Excel Worksheet Functions | |||
merge data from multiple columns to single column | Excel Worksheet Functions |