Hello everyone,
I have to following macro running in the attached workbook "proba2":
Sub Makró1()
Range("H1").Select
Selection.EntireRow.Delete
Columns("H:H").Select
Selection.TextToColumns Destination:=Range("H1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _
TrailingMinusNumbers:=True
Columns("H:K").Select
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("K:K").Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Range("ActiveSheet!$K:$K")
End Sub
First of all, the macro doesn't completely change every "." to "," in the selected range, and also pops up an error message (Run-time error: '1004') referring to the highlighted row of the macro.
Here's a detailed process, what I want the macro to do:
1. Delete the first row
2. Select column H, and divide it to multiple columns using "|" (Alt Gr+W) as a divider.
3. Select the created columns H-K and swap every "." with ","
4. Create a bar graph from column K
Any ideas to make it work?
Bookmarks