Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.
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
|Macro: print each sheet to pdf using ExportAsFixedFormat||11||25|
|how to simplify this IF OR AND functions||9||25|
|Compare values between two columns and copy matching data to new sheet.||2||18|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
18 Experts available now in Live!