Hi anyone can help me on copying a data from column “J” to Column “A” and need to Delete the header Name (Refer to image 2?)
Do i need to use Copy/Paste range activity?
Hi anyone can help me on copying a data from column “J” to Column “A” and need to Delete the header Name (Refer to image 2?)
Do i need to use Copy/Paste range activity?
Input:
Macros Code:
Sub CopyColumnJtoColumnA()
Dim ws As Worksheet
Dim lastRow As Long
' Specify the worksheet
Set ws = ThisWorkbook.Sheets("Sheet1") ' Change "Sheet1" to your sheet name
' Find the last row in column J
lastRow = ws.Cells(ws.Rows.Count, "J").End(xlUp).Row
' Copy the data from column J to column A
ws.Range("J2:J" & lastRow).Copy
ws.Range("A2").PasteSpecial Paste:=xlPasteValues
' Clear the value in cell A1
ws.Range("A1").ClearContents
End Sub
Text File:
Copy data from J to A.txt (522 Bytes)
Workflow:
Output:
Regards
Follow these steps:
For example:
Please give the method name within double quotes "CopyColumnJtoColumnA"
Please refer the below workflow @vignesh.maruthappan
Main Sequence.xaml (12.4 KB)
Let me know if you face any difficulties.
Regards
Sorry that I shared you the wrong workflow:
Check this once. THis will meet your requirement
Main Sequence.xaml (10.7 KB)
Regards
Do you mean if you read it as DataTable, Column1 is automatically added as the first column name?
If so, it’s specification of datatable (Datatable cannot have blank name column)
If you need to first column header as blank, can you try to read the table using ReadRange without AddHeader option, and write it using WriteRange etc without AddHeader option.
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.