0
Hello. I am trying to format a table to base a graph, however I am getting the following error message: "run-time error ? 1004': error defined by the application or defined by the object"
I am using the following macro. Does anything know the reason for the error? The error occurs on the line >>><<<
Sub Botão_ReplicadorColuna()
Dim i, j, UltimaLinha, UltimaColuna As Long
UltimaLinha = 1000000
UltimaColuna = 30
Application.ScreenUpdating = False
For j = 4 To UltimaColuna
For i = UltimaLinha To 1 Step -1
If Cells(i, j).Value <> "" Then
Cells(i + 1, 2).EntireRow.Insert
Cells(i + 1, 1).Value = Cells(i, 1).Value
>>>>Cells(i + 1, 2).Value = Cells(i, 2).Value<<<<
Cells(i + 1, 3).Value = Cells(i, j).Value
Cells(i, j).Value = ClearContents
End If
Next
Next
Application.ScreenUpdating = True
Range("A1").Select
End Sub
I have two spreadsheets. One in which the macro is and the other in which I did a data processing and then copied it and pasted in the macro spreadsheet.
There are no mixed cells.
I could notice that up to 100000 lines the macro works perfectly. After that it presents the error.
What I wish to do is this. I want to replicate the id and content for each existing theme column so that a row is made up of only three columns.
**Original:**
ID / Content / Theme
1 / words / theme/ theme2/ theme3
2 / words / theme/ them2
3 / words / theme
**Pós-macro:**
ID / Content / Theme
1 / words / theme
1 / words / theme2
1 / words / theme3
2 / words / theme
2 / words / theme2
3 / words / theme
In which line does the error occur? How many worksheets do you have? There are merged cells?
– danieltakeshi
If you have lost access to your original account or wish to merge it with your new account please go to https://answall.com/contact and choose the corresponding reason
– Math