add routine to cross join highlighted ranges

This commit is contained in:
Paul Trowbridge 2017-07-12 11:15:50 -04:00
parent bbea1976a4
commit b311408659

36
FL.bas
View File

@ -31,6 +31,42 @@ Sub BackupPersonal()
Application.DisplayAlerts = True
End Sub
Sub Cross_Join_Selection()
Dim x As New TheBigOne
Dim r As range
Dim ar As range
Dim r1() As String
Dim r2() As String
Dim d() As String
Dim i As Integer
Dim dest As String
Set r = Selection
i = 1
For Each ar In r.Areas
If i = 1 Then
r1 = x.SHTp_Get(Excel.ActiveSheet.Name, ar.row, ar.column, False)
Else
r2 = x.SHTp_Get(Excel.ActiveSheet.Name, ar.row, ar.column, False)
r1 = x.TBLp_CrossJoin(r1, r2, False)
End If
i = i + 1
Next ar
dest = InputBox("Input row & column numbers like ""3,17""")
If dest = "" Then
Exit Sub
Else
d = Split(dest, ",")
End If
Call x.SHTp_Dump(r1, Excel.ActiveSheet.Name, CLng(d(0)), CLng(d(1)), False, True)
End Sub
Sub ExtractPNC_CSV()