?
=?iso-8859-1?B?QW5kcuk=?=
Have a macro that keeps deleting what i have in the cell
A1 which is streched over a range of columns but also
deleting all the column headings that i have from B2 to J2.
The macro is supposed to rename 5 of the columns and
delete 4. What i endup with is an almost empty page
except for the heading for the last column (f2). Here is
the code. (now just to note that the if statement that i
use is actually =if(listoptions!B2="","",listoptions!b2)
and not what is showing up in the code for some reason)
A.
Range("B2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
Range("E2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
Columns("F:F").Select
Range("F2").Activate
Selection.Delete Shift:=xlToLeft
Columns("G:I").Select
Range("G2").Activate
Selection.Delete Shift:=xlToLeft
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
End Sub
A1 which is streched over a range of columns but also
deleting all the column headings that i have from B2 to J2.
The macro is supposed to rename 5 of the columns and
delete 4. What i endup with is an almost empty page
except for the heading for the last column (f2). Here is
the code. (now just to note that the if statement that i
use is actually =if(listoptions!B2="","",listoptions!b2)
and not what is showing up in the code for some reason)
A.
Range("B2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
Range("E2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
Columns("F:F").Select
Range("F2").Activate
Selection.Delete Shift:=xlToLeft
Columns("G:I").Select
Range("G2").Activate
Selection.Delete Shift:=xlToLeft
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ListOptions!R[-1]C[-1]="""","""",ListOptions!R
[-1]C[-1])"
End Sub