Last active
June 15, 2024 06:47
-
-
Save ManotLuijiu/1a63a1d93ee204a4faa7dea987171363 to your computer and use it in GitHub Desktop.
Delete Columns in Lazada export file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
วิธี Export คำสั่งซื้อจาก Lazada