Académique Documents
Professionnel Documents
Culture Documents
aa1 bb90
aa8 bb7
aa7 bb6
aa6 bb5
aa5 bb4
aa1 bb90
aa4 bb3
aa1 bb90
aa18 bb17
aa1 bb16
aa17 bb16
aa13 bb12
aa12 bb11
aa11 bb10
aa1 bb90
aa2 bb1
aa1 bb90
Sub M_remove_duplicate_records()
sn = Sheets("uniek").Cells(1).CurrentRegion
With CreateObject("scripting.dictionary")
For j = 1 To UBound(sn)
.Item(sn(j, 1)) = Application.Index(sn, j, 0)
Next
start
aa10 bb9 aa10
aa1 bb9 aa11
aa8 bb7 aa12
aa7 bb6 aa13
aa6 bb5 aa17
aa5 bb4 aa18
aa1 bb4
aa4 bb3
aa1 bb3
aa18 bb17
aa1 bb16
aa17 bb16
aa13 bb12
aa12 bb11
aa11 bb10
aa1 bb1
aa2 bb1
aa1 bb0
Sub M_remove_records()
sn = Sheets("remove records").Cells(1).CurrentRegion.Resize(, 3)
sp = Sheets("remove records").Cells(1, 5).CurrentRegion
With CreateObject("scripting.dictionary")
For j = 1 To UBound(sn)
.Item(sn(j, 1)) = Application.Index(sn, j, 0)
Next
For j = 1 To UBound(sp)
.Remove sp(j, 1)
Next
start
aa10 bb9 aa10 cc1
aa1 bb9 aa1 cc2
aa8 bb7 aa8 cc3
aa7 bb6 aa7 cc4
aa6 bb5 aa6 cc5
aa5 bb4 aa5 cc6
aa1 bb4 aa1 cc7
aa4 bb3 aa4 cc8
aa1 bb3 aa1 cc9
aa18 bb17 aa18 cc10
aa1 bb16 aa1 cc11
aa17 bb16 aa17 cc12
aa13 bb12 aa13 cc13
aa12 bb11 aa12 cc14
aa11 bb10 aa11 cc15
aa1 bb1 aa1 cc16
aa2 bb1 aa2 cc17
aa1 bb0 aa1 cc18
Sub M_complement_records()
sn = Sheets("complement").Cells(1).CurrentRegion.Resize(, 3)
sp = Sheets("complement").Cells(1, 5).CurrentRegion
With CreateObject("scripting.dictionary")
For j = 1 To UBound(sn)
.Item(sn(j, 1)) = Application.Index(sn, j, 0)
Next
For j = 1 To UBound(sp)
st = .Item(sp(j, 1))
st(3) = sp(j, 2)
.Item(sn(j, 1)) = Application.Index(st, 0, 0)
Next
start
aa2 3/18/2013 aa2 18-03-2013
aa1 3/17/2013 aa1 19-03-2010
aa12 3/15/2013 aa12 15-03-2013
aa6 3/14/2013 aa6 16-03-2011
aa1 3/12/2013 aa4 9/3/2013
aa6 3/11/2013 aa5 7/3/2013
aa1 3/10/2013 aa10 2/3/2013
aa4 3/9/2013 aa7 5/3/2012
aa1 3/8/2013 aa8 4/3/2012
aa5 3/7/2013 aa17 13-03-2010
aa6 3/6/2013
aa1 3/3/2013
aa10 3/2/2013
aa7 3/5/2012
aa8 3/4/2012
aa6 3/16/2011
aa1 3/19/2010
aa17 3/13/2010
Sub M_filter_records_lowest_value_in_columnB()
With Sheets("filter least recent").Cells(1)
.CurrentRegion.Sort .Offset(, 1), 2
sn = .CurrentRegion
End With
With CreateObject("scripting.dictionary")
For j = 1 To UBound(sn)
.Item(sn(j, 1)) = Application.Index(sn, j, 0)
Next
start
0, 0)
aa17 3/13/2010
aa1 3/19/2010
aa6 3/16/2011
aa8 3/4/2012
aa7 3/5/2012
aa10 3/2/2013
aa1 3/3/2013
aa6 3/6/2013
aa5 3/7/2013
aa1 3/8/2013
aa4 3/9/2013
aa1 3/10/2013
aa6 3/11/2013
aa1 3/12/2013
aa6 3/14/2013
aa12 3/15/2013
aa1 3/17/2013
aa2 3/18/2013
Sub M_filter_records_highest_value_in_columnB()
With Sheets("filter most recent").Cells(1)
.CurrentRegion.Sort .Offset(, 1)
sn = .CurrentRegion
End With
With CreateObject("scripting.dictionary")
For j = 1 To UBound(sn)
.Item(sn(j, 1)) = Application.Index(sn, j, 0)
Next
start
, 0)
country gender occupation name
sn = Cells(1, 11).CurrentRegion
With CreateObject("scripting.dictionary")
For j = 2 To UBound(sn)
Select Case Target.Address
Case "$A$2"
x0 = .Item(sn(j, 1))
Target = ""
Case "$B$2"
If Target.Value = sn(j, 1) Then x0 = .Item(sn(j, 2))
Case "$D$2"
If Target.Offset(, -2) = sn(j, 1) And Target.Value = sn(j, 2) Then x0 = .Item(sn(j, 3))
Case "$F$2"
If Target.Offset(, -4) = sn(j, 1) And Target.Offset(, -2).Value = sn(j, 2) And Target.Value = sn(j, 3) Then x0 = .Item(sn(j, 4))
End Select
Next
Sub M_combine_ranges()
With CreateObject("scripting.dictionary")
For Each ar In Columns(1).SpecialCells(2).Areas
For j = 1 To ar.Rows.Count
.Item(.Count) = Application.Index(ar.Resize(, 4), j, 0)
Next
Next
Cells(1, 6).Resize(.Count, 4) = Application.Index(.Items, 0, 0)
End With
End Sub
start
Sub M_combine_arrays()
With CreateObject("scripting.dictionary")
sn = Cells(1).CurrentRegion
sp = Cells(14, 1).CurrentRegion
For j = 1 To UBound(sn)
.Item(.Count) = Application.Index(sn, j, 0)
Next
For j = 1 To UBound(sp)
.Item(.Count) = Application.Index(sp, j, 0)
Next
sq = Application.Index(.Items, 0, 0)
End With
ListBox1.List = sq
End Sub
start
Sub M_integration()
With CreateObject("scripting.dictionary")
For Each sh In Sheets
If sh.Name <> "integration" And sh.UsedRange.Count > 1 Then .Item(sh.Name) = sh.UsedRange
Next
start
nge
2)) = it
Sub M_integration_csv()
MsgBox Replace("Adapt the paths in the macro.~~Use a folder that contains only a few csv-bestanden for testing", "~",
vbLf), , "Attention"
c00 = "G:\OF\"
sn = Split(CreateObject("wscript.shell").exec("cmd /c Dir """ & c00 & "*.csv"" /b").stdout.readall, vbCrLf)
With CreateObject("scripting.dictionary")
For j = 0 To UBound(sn)
.Item(sn(j)) = GetObject(c00 & sn(j)).Sheets(1).UsedRange.Value
GetObject(c00 & sn(j)).Close False
Next
start
ting", "~",
aa10
aa1
aa8
aa7
aa6
aa5
aa1
aa4
aa1
aa18
aa1
aa17
aa13
aa12
aa11
aa1
aa2
aa1
Sub M_unique_in_combobox()
sn = Cells(1, 9).CurrentRegion
With CreateObject("scripting.dictionary")
For Each it In sn
x0 = .Item(it)
Next
ComboBox1.List = .keys
End With
End Sub
start
aa1_aa2_aa3_aa4_aa5|bb1_bb2_bb3_bb4_bb5|cc1_cc2_cc3_cc4_cc5
Sub M_split_textstring()
With CreateObject("scripting.dictionary")
For Each it In Split("aa1_aa2_aa3_aa4_aa5|bb1_bb2_bb3_bb4_bb5|cc1_cc2_cc3_cc4_cc5", "|")
.Item(.Count) = Application.Index(Split(it, "_"), 1, 0)
Next
start
Private dict_actX As Dictionary
Sheets("ActiveX control").CommandButton1.Visib
End Sub
X As Dictionary
rksheet_Activate()
= CreateObject("scripting.dictionary")
tbox1_change()
tBox2_Change()
tBox3_Change()
mboBox4_Change()
mboBox5_Change()
controle()
dict_actX.Items
bject.Value <> "")
eX control").CommandButton1.Visible = y
In macromodule sheet_exists
Sub M_sheets()
For Each sh In Sheets
x0 = sheetss.Item(sh.Name)
Next
End Sub
Sub M_sheet_exists()
If sheetss.Count = 0 Then M_sheets
MsgBox "Worksheet Unique exists: " & Format(sheetss.Exists("unique"), "Yes/no"), , "Does the worksheet Unique exist ?"
MsgBox "Worksheet Summary exists: " & Format(sheetss.Exists("summary"), "Yes/no"), , "Does the worksheet Summary exist ?"
End Sub
start
Unique exist ?"
heet Summary exist ?"
Public dict_ct As New Dictionary In the classmodule C_Eventcontrol
ekstvak As MSForms.TextBox
eusvak As MSForms.ComboBox
k_Change()
ext)
(.Parent) = "Worksheet" Then .Parent.Caption = .Name
k_Change()
Value)
(.Parent) = "Worksheet" Then .Parent.Caption = .Name
Public dict_ac As New Dictionary In the classmodule C_Eventcontrol
tekstvak As MSForms.TextBox
keusvak As MSForms.ComboBox
ak_Change()
Text)
e(.Parent) = "Worksheet" Then .Parent.Caption = .Name
ak_Change()
.Value)
e(.Parent) = "Worksheet" Then .Parent.Caption = .Name