0

I am trying to insert some conditional formatting in Excel so when you go into the Conditional Formatting settings the formula reads: =$K11="✓" however I haven't had any luck at all.

The code I have is shown below but it doesn't seem to work, that just throws an error.

Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$SK11=""" & ChrW(&H2713)

The below kind of works but it shows as ="$SK11=✓" in the settings so its added an extra quotation mark at the front and is missing the quotation mark before the tick

Selection.FormatConditions.Add Type:=xlExpression, Formula1:="$SK11=" & ChrW(&H2713)
Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
  • 2
    Try building the string using Chr(34) instead of Doublequotes. Something like `Formula1:="=$K11=" & Chr(34) & ChrW(&H2713) & Chr(34)` – Stax Aug 30 '19 at 01:52
  • Further info/Other solutions: (https://stackoverflow.com/questions/9024724/how-do-i-put-double-quotes-in-a-string-in-vba) – Stax Aug 30 '19 at 03:10
  • In the text you mention `K11`; in the code it's `SK11"`. Which is correct? – Cindy Meister Aug 30 '19 at 14:18

0 Answers0