Hey community!
I have the following table:
[TABLE="width: 960"]
<colgroup><col width="80" span="12" style="width:60pt"> </colgroup><tbody>[TR]
[TD="width: 80"]ID[/TD]
[TD="width: 80"]AB[/TD]
[TD="width: 80"]BE[/TD]
[TD="width: 80"]DT[/TD]
[TD="width: 80"]TM[/TD]
[TD="width: 80"]AA[/TD]
[TD="width: 80"]BB[/TD]
[TD="width: 80"]CC[/TD]
[TD="width: 80"]DD[/TD]
[TD="width: 80"][/TD]
[TD="width: 80"]FF[/TD]
[TD="width: 80"]FF[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]BE1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]00:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]AB1[/TD]
[TD]BE2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]01:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]AB1[/TD]
[TD]BE2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]02:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]AB1[/TD]
[TD]BE2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]03:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]AB1[/TD]
[TD]BE2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]04:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]05:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]06:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]07:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]08:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]09:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD]AB2[/TD]
[TD]BA2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]10:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]11:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]12:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]13:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]14:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]15:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]16:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
I would now like to filter by means of VBA and create the results as a new worksheet and save this sheet individually as a new file in a different folder.
The first file results from "AB1" in column 2 and "BE1" in column 3.
The second file results from "AB1" in column 2 and "BE2" in column 3.
The third file results from "AB2" in column 2 and "BA1" in column 3.
The fourth file results from "AB2" in column 2 and "BA2" in column 3.
The fifth file results from "AB3" in column 2 and "BA3" in column 3.
The folder for the first file is: "C: \ Users \ Adam "
The folder for the second file is: "C: \ Users \ Adam \ 1 "
The folder for the third file is: "C: \ Users \ Adam \ 2 "
The folder for the fourth file is: "C: \ Users \ Adam \ 3 "
The folder for the fifth file is: "C: \ Users \ Adam \ 4 "
Does anyone have any idea how this can be implemented?
With IF statements or with Case?
I've already worked with the macro recorder, but it never worked on new records.
Greeting!
I have the following table:
[TABLE="width: 960"]
<colgroup><col width="80" span="12" style="width:60pt"> </colgroup><tbody>[TR]
[TD="width: 80"]ID[/TD]
[TD="width: 80"]AB[/TD]
[TD="width: 80"]BE[/TD]
[TD="width: 80"]DT[/TD]
[TD="width: 80"]TM[/TD]
[TD="width: 80"]AA[/TD]
[TD="width: 80"]BB[/TD]
[TD="width: 80"]CC[/TD]
[TD="width: 80"]DD[/TD]
[TD="width: 80"][/TD]
[TD="width: 80"]FF[/TD]
[TD="width: 80"]FF[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]BE1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]00:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]AB1[/TD]
[TD]BE2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]01:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]AB1[/TD]
[TD]BE2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]02:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]AB1[/TD]
[TD]BE2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]03:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]AB1[/TD]
[TD]BE2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]04:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]05:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]06:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]07:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]08:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]AB2[/TD]
[TD]BA1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]09:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD]AB2[/TD]
[TD]BA2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]10:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]11:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]12:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]13:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]14:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]15:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD]AB3[/TD]
[TD]BA3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="class: xl64, align: right"]16:00:00[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
I would now like to filter by means of VBA and create the results as a new worksheet and save this sheet individually as a new file in a different folder.
The first file results from "AB1" in column 2 and "BE1" in column 3.
The second file results from "AB1" in column 2 and "BE2" in column 3.
The third file results from "AB2" in column 2 and "BA1" in column 3.
The fourth file results from "AB2" in column 2 and "BA2" in column 3.
The fifth file results from "AB3" in column 2 and "BA3" in column 3.
The folder for the first file is: "C: \ Users \ Adam "
The folder for the second file is: "C: \ Users \ Adam \ 1 "
The folder for the third file is: "C: \ Users \ Adam \ 2 "
The folder for the fourth file is: "C: \ Users \ Adam \ 3 "
The folder for the fifth file is: "C: \ Users \ Adam \ 4 "
Does anyone have any idea how this can be implemented?
With IF statements or with Case?
I've already worked with the macro recorder, but it never worked on new records.
Greeting!