I am trying to select Column I,K, Q,R and format the entire columns from row 2 as Date (mm/dd/yyyy) I know this code will select all of the columns which I don't need. Can anyone help me with this with VBA code? Thank you! I included a part of my code to ask you if it is possible to include the date formatting within the first chunk of code. wsMain is a sheet for your information
With wsMain
.Columns("A:AO").AutoFit
.Cells.ClearFormats
.Rows(1).Font.Bold = True
.Cells.Font.Name = "Georgia"
.Cells.Font.Color = RGB(0, 0, 225)
.Cells.Resize(.Rows.Count - 1).Offset(1).Interior.Color = RGB(216, 228, 188)
Sub SelectColumn()
Dim xColIndex As Integer
Dim xRowIndex As Integer
xIndex = Application.ActiveCell.Column
xRowIndex = Application.ActiveSheet.Cells(Rows.Count, xIndex).End(xlUp).Row
Range(Cells(2, xIndex), Cells(xRowIndex, xIndex)).Select
You try something simple like this
Example 2