VBA - Filter and export

joslaz

Board Regular
Joined
May 24, 2018
Messages
76
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!
 
How about
Code:
Sub CopyFilter()
   Dim Ary As Variant
   Dim i As Long
   Dim Pth As String
   
   Application.ScreenUpdating = False
   Pth = "C:\MrExcel\Fluff\"
   Ary = Array("AB1", "<>", "AA\", "AB1", "B1", "AB\", "AB1", "B2", "AC\", "AB2", "B1", "AC\AA\", "AB3", "B2", "AC\AB\")
   With Sheet9
      If .AutoFilterMode Then .AutoFilterMode = False
      For i = 0 To UBound(Ary) Step 3
         .Range("A1:L1").AutoFilter 3, Ary(i)
         .Range("A1:L1").AutoFilter 4, Ary(i + 1)
         Workbooks.Add (1)
         .AutoFilter.Range.Copy Range("A1")
         ActiveWorkbook.SaveAs Pth & Ary(i + 2) & Ary(i) & Ary(i + 1) & ".xlsx", 51
         ActiveWorkbook.Close False
      Next i
      .AutoFilterMode = False
   End With
End Sub
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Thanks a lot!

It works perfectly!

This was missing ("<>") at my approach :/
Is there any operator, to get all data with AB1 in column3 and B3-B3 in column 4? ("AB1", "B3-B5", "AA")


Best regards!
 
Upvote 0
Is that instead of any of the existing criteria, or an additional criteria?
Also before I change it all, are there any other criteria you want to throw into the mix?
 
Upvote 0
Nope thats all.
Thanks a lot!

The next step would be to debug the code.
Especially if there are still existing files, with the same name.
Something like overwrite or replace the new file.
The old file is no more needed longer.
 
Upvote 0
How about
Code:
Sub CopyFilter()
   Dim Ary As Variant
   Dim i As Long
   Dim Pth As String
   
   Application.ScreenUpdating = False
   Pth = "C:\MrExcel\Fluff\"
   Ary = Array("AB1", "<>", "<>", "AA\", "AB1", "B1", "B1", "AB\", "AB1", "B2", "B2", "AC\", "AB1", ">=B3", "<=B5", "AA\", "AB2", "B1", "B1","AC\AA\", "AB3","B2", "B2", "AC\AB\")
   With Sheet9
      If .AutoFilterMode Then .AutoFilterMode = False
      For i = 0 To UBound(Ary) Step 4
         .Range("A1:L1").AutoFilter 3, Ary(i)
         .Range("A1:L1").AutoFilter 4, Ary(i + 1), xlAnd, Ary(i + 2)
         Workbooks.Add (1)
         .AutoFilter.Range.Copy Range("A1")
         ActiveWorkbook.SaveAs Pth & Ary(i + 2) & Ary(i) & Ary(i + 1) & ".xlsx", 51
         ActiveWorkbook.Close False
      Next i
      .AutoFilterMode = False
   End With
End Sub
 
Upvote 0
Fluff, thanks a lot!

Unfortunately, I get now all data. There is no more separation along the criteria.

Do you know why?


Best regards!
 
Upvote 0
Can you post the data you are currently working with?
 
Upvote 0
[TABLE="width: 960"]
<colgroup><col width="80" span="4" style="width:60pt"> <col width="80" style="width:60pt"> <col width="80" span="7" style="width:60pt"> </colgroup><tbody>[TR]
[TD="width: 80"]ID[/TD]
[TD="width: 80"]DD[/TD]
[TD="width: 80"]AB[/TD]
[TD="width: 80"]BE[/TD]
[TD="class: xl63, width: 80"]DT[/TD]
[TD="width: 80"]TM[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,04166667[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,08333333[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,125[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,16666667[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,20833333[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,25[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,29166667[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B3[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,33333333[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B4[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,375[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B4[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,41666667[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B4[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,45833333[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B4[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,5[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B5[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,54166667[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B5[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,58333333[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B5[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,625[/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="align: right"]1[/TD]
[TD]AB1[/TD]
[TD]B5[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,66666667[/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"]18[/TD]
[TD="align: right"]1[/TD]
[TD]AB2[/TD]
[TD]B1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,33333333[/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"]19[/TD]
[TD="align: right"]1[/TD]
[TD]AB2[/TD]
[TD]B1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,375[/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"]20[/TD]
[TD="align: right"]1[/TD]
[TD]AB2[/TD]
[TD]B1[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,41666667[/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"]21[/TD]
[TD="align: right"]1[/TD]
[TD]AB3[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,45833333[/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"]22[/TD]
[TD="align: right"]1[/TD]
[TD]AB3[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,5[/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"]23[/TD]
[TD="align: right"]1[/TD]
[TD]AB3[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,54166667[/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"]24[/TD]
[TD="align: right"]1[/TD]
[TD]AB3[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,58333333[/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"]25[/TD]
[TD="align: right"]1[/TD]
[TD]AB3[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,625[/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"]26[/TD]
[TD="align: right"]1[/TD]
[TD]AB3[/TD]
[TD]B2[/TD]
[TD="class: xl63, align: right"]01.01.2018[/TD]
[TD="align: right"]0,66666667[/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]
 
Upvote 0
I'm not getting all the data, just the filtered list. Have you made any changes to the code?
Although the files won't save anymore because of illegal characters. This will resolve that
Code:
         ActiveWorkbook.SaveAs Pth & ary(i + 3) & ary(i) & "(" & i & ")" & ".xlsx", 51
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top