So its been a few day since my first post which may have been a case of to much information. So I will approach my problem from a different angle and try to resolve one piece of the puzzle at a time.
I really expected to find the answer after extensive searches of numerous forums as this is easy to solve with a formula. I can post my working formulas if anyone wants to see them. Unfortunately the load on the system with all the formulas requires a VBA solution.
I have the following VBA. This code indexes the source sheet/column and copies a unique distinct list to the target sheet/column. Works great, automates the process and removes a bunch of very slow formulas. I change this up as needed, name, source ranges, target ranges and fire it off with a button with this code
Sub Calculate New()
Call T1Dates
Call T2Dates
Call PMDates
Call T1Names
Call T2 Names
End Sub
As the source data is already sorted I have not needed to sort the output, but combining two columns adds that requirement.
Sub T1Dates()
Dim a, e
With Sheets("T1")
a = .Range("B4", .Range("b" & Rows.Count).End(xlUp)).Value
End With
With CreateObject("Scripting.Dictionary")
.comparemode = 1
For Each e In a
If Not IsEmpty(e) Then .Item(e) = Empty
Next
Columns("l").ClearContents
Range("l5").Resize(.Count).Value = _
Application.Transpose(.Keys)
End With
End Sub
How to modify this to index two columns on two sheets, and create a unique distinct list preferably sorted. Don't let the sub name "Dates" throw you. The data could be names, dates or numbers.
2to1.jpg
Any help would be appreciated as I have been searching and trying code for a while now.
Bookmarks