Hi,
my management wants me to extract the usage report of printers each month. It would have been very easy just to extract the csv sheet and send to them.
I need to remove unused columns and rename the used columns. i have about 5 printers and this will cost me a loooot of time to manually doing these changes.
I have been surfing around the web and could find a solution to have a macro remove all the unused columns but i need to have something now to rename this columns.( if it can fit in the same macros it will be too good)

here is the macro i found on the web:

Option Explicit
Option Base 1
Sub DeleteColumns()
Dim LC As Long, a As Long, b As Long, d As Long
Dim KeepColArray
Application.ScreenUpdating = False
KeepColArray = Array("Account Name", "Counter: Total Black Copy and Print Impressions", "Counter: Total Color Copy and Print Impressions", "Limit: Color Copy Used", "Sub-Counter: Color Large Copy Impressions", "Limit: Black Copy Used", "Sub-Counter: Black Large Copy Impressions", "Limit: Color Print Used", "Sub-Counter: Color Large Print Impressions", "Limit: Black Print Used", "Sub-Counter: Black Large Print Impressions")
LC = Cells(1, Columns.Count).End(xlToLeft).Column
For a = LC To 1 Step -1
d = 0
For b = LBound(KeepColArray) To UBound(KeepColArray)
If Cells(1, a).Value = KeepColArray(b) Then
d = d + 1: If d > 0 Then Exit For
End If
Next b
If d = 0 Then
Cells(1, a).EntireColumn.Delete
End If
Next a
Application.ScreenUpdating = True
End Sub



Thanks to let me know if you can sort me out o f this