Hi Folks,
First, I must say that this community is AWESOME.
You willingness to help and so quickly is greatly appreciated.
The following macro will be used on tables with different numbers of rows.
It formats all of the rows in the columns.
Is there a way of having only the rows with data formatted?
Your assistance is appreciated. Thanks.
First, I must say that this community is AWESOME.
You willingness to help and so quickly is greatly appreciated.
The following macro will be used on tables with different numbers of rows.
It formats all of the rows in the columns.
Is there a way of having only the rows with data formatted?
VBA Code:
Range("D:E,G:G").Select
Range("G1").Activate
Selection.Delete Shift:=xlToLeft
Columns("A:J").Select
Selection.Columns.AutoFit
Range("C1").Select
ActiveCell.FormulaR1C1 = "KHub Project " & Chr(10) & "Completeness"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Has Proposal " & Chr(10) & "Document"
Range("E1").Select
ActiveCell.FormulaR1C1 = "Has Project " & Chr(10) & "Document"
Range("F1").Select
ActiveCell.FormulaR1C1 = "Has a Project " & Chr(10) & "Description"
Columns("C:G").Select
Selection.ColumnWidth = 16
Columns("H:H").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.ColumnWidth = 70
Range("J1").Select
ActiveCell.FormulaR1C1 = "Abt " & Chr(10) & "Organization"
Range("K1").Select
Columns("J:J").ColumnWidth = 13.57
Columns("A:J").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Columns("H:H").Select
Range("A1").Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A:J"), , xlYes).Name = _
"Table31"
ActiveSheet.ListObjects("Table31").TableStyle = "TableStyleLight21"
Columns("C:C").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 13434879
.TintAndShade = 0
.PatternTintAndShade = 0
End With