Find and replace with a tick

G

Guest

I have a visual basic form to gather user data and then input it into an
excel database. Im using a few option boxes and when inputting the data into
the excel sheet it states the selected option box as TRUE, the others as
FALSE.

I want to FIND and REPLACE in excel to FIND all instances of TRUE and
replace with a wingdings tick symbol and the FALSE with a wingdings X symbol.

Anyone any ideas how I can do this?

Thanks a lot,
James
 
B

Bernie Deitrick

James,

If you have the values TRUE or FALSE:

Application.ReplaceFormat.Font.Name = "Wingdings"
Selection.Replace What:="TRUE", Replacement:=Chr(254), _
LookAt:=xlPart, _
ReplaceFormat:=True
Selection.Replace What:="FALSE", Replacement:=Chr(253), _
LookAt:=xlPart, _
ReplaceFormat:=True

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top