Super, dekuji moc - princip funguje dobre. Akorat mam problem, nahrazuji , za ; a . za , a tato zmena se provede vzdy jen u posledniho souboru spravne, ve zbytku zustava tecka a bunka se bere jako textovy retezec.
Sub Makro1()
'
' Makro1 Makro
'
Dim wb As Workbook, wbX As Workbook
Dim i As Integer, j As Integer
'zkratka pro tento sesit
Set wb = ThisWorkbook
' Otevri dialog
With Application.FileDialog(msoFileDialogOpen)
.InitialFileName = ""
.AllowMultiSelect = True
.Filters.Add "Excel", "*.xls"
.Show
' pro kazdy soubor
For i = 1 To .SelectedItems.Count
Workbooks.Open .SelectedItems(i)
Set wbX = ActiveWorkbook
'nakopiruj listy do wb
Rows("1:112").Select
Selection.Delete Shift:=xlUp
Range("I17").Select
Rows("54:266").Select
Selection.Delete Shift:=xlUp
Range("J10").Select
Columns("A:A").ColumnWidth = 48.14
Range("A1:A52").Select
Selection.Replace What:=",", Replacement:=";", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=True, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1)), TrailingMinusNumbers:=True
Columns("A:A").ColumnWidth = 14.57
Range("L11").Select
Next i
cesta = "C:\Users\Jakub\Desktop\SPY_hotove_data"
For p = 1 To 2
jmeno = cesta & "sešit" & p & ".xls" 'Alebo jmeno=cells(i,1)
ActiveWorkbook.SaveAs Filename:=jmeno
Next p
End With
citovat