Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello I have excel 2003 . Every day I receive a file and I have to delete
some columns. so I created a simple macro to delete the columns I do not need. Sub NewInv() ' ' Columns("A:A").Select Selection.Delete Shift:=xlToLeft Columns("C:C").Select Selection.Delete Shift:=xlToLeft Columns("D:F").Select Selection.Delete Shift:=xlToLeft Columns("F:G").Select Selection.Delete Shift:=xlToLeft Columns("H:I").Select Selection.Delete Shift:=xlToLeft Columns("J:L").Select Selection.Delete Shift:=xlToLeft Columns("M:M").Select Selection.Delete Shift:=xlToLeft Columns("N:O").Select Selection.Delete Shift:=xlToLeft End Sub But when I run the macro the next day it deletes the wrong columns Please help thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro deletes row in range, macro then skips the row moved up | Excel Discussion (Misc queries) | |||
MACRO which deletes a row, when it finds a specific number | Excel Discussion (Misc queries) | |||
Excel Charting Macro That deletes Sheet | Excel Discussion (Misc queries) | |||
Macro that deletes every third row....+ | Excel Discussion (Misc queries) | |||
Renaming and saving workbooks but macro still deletes | Excel Worksheet Functions |