Jonnathanjons
Member
This is a part of a large vba script running and this part applies only for the header row
Couple of questions I have:
1) How do I color last 5 column header using below vba below
Range(Range("A1"), Range("A1").End(xlToRight)).Interior.ColorIndex = 15
Range(Range("A1"), Range("A1").End(xlToRight)).resize(1,-5) .Interior.ColorIndex = 40 <<<<< Need help here
2 Instead of above vba script using Range() how can I convert above script to using cells()
With ws.UsedRange.Columns
.Cells(1, .Columns.Count).End(xlToRight).Interior.ColorIndex =15 <<<<<< Need help in this line to select till last column and color
3) Also the same for last 6 columns
With ws.UsedRange.Columns
.Cells(1, .Columns.Count).End(xlToRight).resize(1,-5) . Interior.ColorIndex =40 <<<<<< Need help in this line to select till last column and color
A humble request to rookies : pls refrain from suggesting manual changes etc ...
Couple of questions I have:
1) How do I color last 5 column header using below vba below
Range(Range("A1"), Range("A1").End(xlToRight)).Interior.ColorIndex = 15
Range(Range("A1"), Range("A1").End(xlToRight)).resize(1,-5) .Interior.ColorIndex = 40 <<<<< Need help here
2 Instead of above vba script using Range() how can I convert above script to using cells()
With ws.UsedRange.Columns
.Cells(1, .Columns.Count).End(xlToRight).Interior.ColorIndex =15 <<<<<< Need help in this line to select till last column and color
3) Also the same for last 6 columns
With ws.UsedRange.Columns
.Cells(1, .Columns.Count).End(xlToRight).resize(1,-5) . Interior.ColorIndex =40 <<<<<< Need help in this line to select till last column and color
A humble request to rookies : pls refrain from suggesting manual changes etc ...