ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find and replace with a tick (https://www.excelbanter.com/excel-worksheet-functions/141606-find-replace-tick.html)

JDavidson

Find and replace with a tick
 
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

Bernie Deitrick

Find and replace with a tick
 
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


"JDavidson" wrote in message
...
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





All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com