Example: A Range is selected, at the moment about three rows and X (from 1 to 7, it depends) columns. The first selected row, I would want the format to be: Fill: With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 14540253 With Selection.Font .Name = "Calibri" .FontStyle = "Bold" .Size = 11 .Color = 6304256 For the Next two rows the following needs to occur: Range("C10:E10").Select '(it could be ("C10:I10") With Selection.Interior .Pattern = xlPatternLinearGradient .Gradient.Degree = 90 .Gradient.ColorStops.Clear End With With Selection.Interior.Gradient.ColorStops.Add(0) .Color = 15131874 .TintAndShade = 0 End With With Selection.Interior.Gradient.ColorStops.Add(0.5) .Color = 16512499 .TintAndShade = 0 End With With Selection.Interior.Gradient.ColorStops.Add(1) .Color = 15131874 .TintAndShade = 0 End With Range (1st column and all other rows -- at the moment its only two, or rows 2&3 of selection), this example it's "C10" With Selection.Font .Name = "Calibri" .FontStyle = "Regular" .Size = 11 .Color = 6304256 End With ' The second column, rest of rows, or rows 2 and 3) Range("D10").Select 'Col D happens to be the 2nd column in the selection With Selection.Font .Name = "Calibri" .FontStyle = "Bold" .Size = 11 .Color = 9521920 .TintAndShade = 0 .ThemeFont = xlThemeFontMinor End With End Sub
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE