Skip to content

Instantly share code, notes, and snippets.

@ManotLuijiu
Last active June 15, 2024 06:47
Show Gist options
  • Save ManotLuijiu/1a63a1d93ee204a4faa7dea987171363 to your computer and use it in GitHub Desktop.
Save ManotLuijiu/1a63a1d93ee204a4faa7dea987171363 to your computer and use it in GitHub Desktop.
Delete Columns in Lazada export file
Sub DeleteColumns()
Dim ws As Worksheet
Dim col As Range
' Set the worksheet you want to work on
Set ws = ThisWorkbook.Sheets("ALL")
' Specify the columns you want to delete
' You can specify columns by their letters or numbers (e.g., "A", "C", "E" or 1, 3, 5)
Dim columnsToDelete As Variant
columnsToDelete = Array("A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "AA", "AB", "AC", "AD", "AE", "AF", "AG", "AH", "AI", "AJ", "AK", "AL", "AM", "AN", "AO", "AP", "AQ", "AR", "AS", "AT", "AY", "BB", "BC", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BK", "BL", "BM", "BO", "BP", "BQ", "BR", "BS", "BT", "BU", "BV", "BW", "BX")
' Loop through the array in reverse order to delete the columns
For i = UBound(columnsToDelete) To LBound(columnsToDelete) Step -1
ws.Columns(columnsToDelete(i)).Delete
Next i
End Sub
@ManotLuijiu
Copy link
Author

วิธี Export คำสั่งซื้อจาก Lazada

LazadaExport1-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment