My VBA script works just okay, when I run macro script I have DATE on column "C", TOTALS on Column "D", Datasource lands on SHEET2, however, Date Column and Totals on column D SHEET2 do not list, neither Dollar $ sign symbol unless I manually got to DATA-> Text to column. If I record macro just for Text To Column it all works, I would like to run my Macro with text to column process with no errors.
My script:
Sub CopyPasteSheet2()
Dim lr As Long
Dim i As Long
Dim inputdtae As Date
Dim rng As Range
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = lr - 1 To 2 Step -1
If Cells(i, "B") = "LLC" Then
Cells(i, "B").EntireRow.Delete
End If
Next i
Dim LastRow As Long
Dim Sheet2 As Worksheet
Dim Results As Worksheet
Set Results = Sheets("Sheet2")
LastRow = Results.Cells(Results.Rows.Count, "Z").End(xlUp).Row
Range("A15:A400").Copy
Results.Range("A" & LastRow + 2).PasteSpecial xlValues
Range("B15:B400").Copy
Results.Range("B" & LastRow + 2).PasteSpecial xlValues
Range("J15:J400").Copy
Results.Range("C" & LastRow + 2).PasteSpecial xlValues
Range("R15:R400").Copy
Results.Range("D" & LastRow + 2).PasteSpecial xlValues
Application.DataEntryMode = False
End Sub
My script:
Sub CopyPasteSheet2()
Dim lr As Long
Dim i As Long
Dim inputdtae As Date
Dim rng As Range
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = lr - 1 To 2 Step -1
If Cells(i, "B") = "LLC" Then
Cells(i, "B").EntireRow.Delete
End If
Next i
Dim LastRow As Long
Dim Sheet2 As Worksheet
Dim Results As Worksheet
Set Results = Sheets("Sheet2")
LastRow = Results.Cells(Results.Rows.Count, "Z").End(xlUp).Row
Range("A15:A400").Copy
Results.Range("A" & LastRow + 2).PasteSpecial xlValues
Range("B15:B400").Copy
Results.Range("B" & LastRow + 2).PasteSpecial xlValues
Range("J15:J400").Copy
Results.Range("C" & LastRow + 2).PasteSpecial xlValues
Range("R15:R400").Copy
Results.Range("D" & LastRow + 2).PasteSpecial xlValues
Application.DataEntryMode = False
End Sub