• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to insert 2 colors in a single cell.

archit013

New Member
Hi,

I have attached a Excel file which contains two colors in a single cell.

Assist me in writing a macro for this.

Thankyou
Archit
__________________________________________________________________
Mod edit : thread moved to appropriate forum !
 

Attachments

  • Two Color.xlsx
    10.9 KB · Views: 10
Hi,

Something like this?
Code:
Sub Test()
  With Selection.Interior
  .Pattern = xlPatternLinearGradient
  .Gradient.Degree = 90
  .Gradient.ColorStops.Clear
  End With
  With Selection.Interior.Gradient.ColorStops.Add(0)
  .Color = 255
  .TintAndShade = 0
  End With
  With Selection.Interior.Gradient.ColorStops.Add(1)
  .ThemeColor = xlThemeColorAccent1
  .TintAndShade = 0
  End With
End Sub
 
Back
Top