nomadsignature.blogg.se

How to create a macro to highlight a word in word
How to create a macro to highlight a word in word









how to create a macro to highlight a word in word

How to compare two strings for similarity or highlight differences in Excel?.How to highlight cell if value exists in or equals to cell in another column in Excel?.Then you can see all the words you have specified are colored in red in selected cells immediately as below screenshot shown.

how to create a macro to highlight a word in word

And in the Kutools for Excel dialog box, please enter the certain word you will highlight in cells, and then click the OK button.

how to create a macro to highlight a word in word

XCell.Characters(Len(xStrTmp) + 1, xHStrLen).Font.ColorIndex = 3ģ. If TypeName(xHStr) "String" Then Exit Sub XHStr = Application.InputBox("What is the string to highlight:", "KuTools For Excel",, ,, ,, 2) VBA code: Color certain word in cells in Excel Sub HighlightStrings()ĭim xHStrLen As Long, xCount As Long, I As Long Then copy and paste VBA code into the Code window. In the opening Microsoft Visual Basic for Applications window, click Insert > Module. Then press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.Ģ. Select the range contains the cells you want to highlight certain word inside. The following VBA code can help you highlight the certain word in a selection. If a cell contains multiple words, how can you highlight a certain word only in this cell? And how about highlighting this certain word in multiple cells? This article will provide a method to achieve it.Ĭolor certain word in a single cell/multiple cells with VBA code How to color or highlight certain word in cells in Excel?











How to create a macro to highlight a word in word