BrianFires March 20, 2013 at 12:50:10 Specs: Windows XP
What is the macro code to delete columns found when the value is zero. For instance If cells a1, b1, and c1 have values of other than 0 but then cells d1, e1, f1 have values of 0, how can I get Excel to know to deleted columns D, E, and F?
'Determine last column with data in Row 1
lastCol = Cells(1, Columns.Count).End(xlToLeft).Column
'Loop through Row 1 (Reverse Order)
For colNum = lastCol To 1 Step -1
'Delete Column if Row 1 contains 0
If Cells(1, colNum) = 0 Then
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.