Change "Yes" to a tick

SaraWitch

Active Member
Joined
Sep 29, 2015
Messages
322
Office Version
  1. 365
Platform
  1. Windows
Hello peeps,

I would like to change Yes to a tick in the same cell - can this be done? I know how to acheive this in a different column with a formula, but would like it to automatically change in the same cell, same column. Conditionally formatting doesn't work, unfortunately, so I'm guessing a VBA?

Ta muchly, folks!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
How is the Yes getting into the cell?
 
Upvote 0
Hi SaraWitch,

Use Worksheet events.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If LCase(Target.Value) = "yes" Then
        Target.Value = ChrW(&H2713)
    End If
End Sub
 
Upvote 0
Sorry, @Fluff, by Data Validation List, or manual entry.

But @Saurabhj vba works a treat - could I add to this to change to a cross if "no"? ;)
 
Upvote 0
Which cells do you want this to work on?
 
Upvote 0
Which cells do you want this to work on?
In one column, e.g., G32:G51. So if "yes" is selected from DVL in cell G32, then tick, if no, then cross. @Saurabhj solution works a treat for ticks... I'm Googling the ChrW code for a cross, but can't find it yet!
 
Last edited:
Upvote 0
Ok, how about
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.CountLarge > 1 Then Exit Sub
   If Not Intersect(Target, Range("G32:G51")) Is Nothing Then
      Select Case LCase(Target.Value)
         Case "yes": Target.Value = ChrW(10004)
         Case "no": Target.Value = ChrW(10006)
      End Select
   End If
End Sub
 
Upvote 0
Solution
Perfect; thank you! I fiddled with a different type of tick and cross, but this is great.

Thank you both for your help...
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,977
Members
449,200
Latest member
Jamil ahmed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top