OK, good morning! Here we go. I will paste to you certain sections where I am deleting columns, formatting selected cells in a row, and grouping items. All of which, I would like to specify based on a particular cells content.
The following is the start of things,
deleting columns that are unnecessary:
Code:
Range("E:E,G:G").Select
Range("G1").Activate
Selection.Delete Shift:=xlToLeft
Columns("H:H").Select
Selection.Delete Shift:=xlToLeft
The actual column names are:
Column E= "Baseline Start"
Column G= "Baseline Finish"
Column H= "Resource Names"
The following code is
formatting selected cells in a row:
Code:
ActiveSheet.Range("$A$1:$L$264").AutoFilter Field:=12, Criteria1:="Header"
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("A2:L11").Select
ActiveWindow.Zoom = 60
Range("A2:L11,A43:L43,A103:L103,A134:L145,A186:L254").Select
Range("A186").Activate
With Selection.Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorLight2
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0
End With
Range("A12:L25,A44:L94,A104:L118,A146:L181,A255:L261").Select
Range("A255").Activate
With Selection.Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -4.99893185216834E-02
.PatternTintAndShade = 0
End With
Example: For A2:L11. In row 2, I would like to format this row from cells A2:L2 based on the information contained in cell C2 "Scope / Design". In row 11, format cells A11:L11 based on the content contained in C11 "Development". In row 43, format cells based on content in C43 "Logistics".. and so on.
The following code is to
group different sections:
Code:
Rows("147:164").Select
Selection.Rows.Group
Range("A151").Select
ActiveWindow.SmallScroll Down:=15
Rows("166:171").Select
Selection.Rows.Group
Rows("173:180").Select
Selection.Rows.Group
Rows("182:185").Select
Range("A185").Activate
Selection.Rows.Group
Rows("146:185").Select
Range("A185").Activate
Selection.Rows.Group
And here, first I group the sub-phases, and return to group the entire phase.
So, for instance I'll give you the info on the first sub-phase and last sub-phase of this phase: 147:164 are all the tasks contained in the sub-phase in cell C146 ("Small - Counts"). 182:185 are tasks contained in the sub-phase in cell C181 ("Pull List"). And the Phase itself, contained in cell C145 ("Sample").
all of the specific information I want to use when formatting by colors and grouping, is located in column C, which is the column for "Task Name"
Let me know if you need more information.