[엑셀 실무](셀 속의) 특정 문자열 몽땅 찾아 글자 색 바꾸기(change font in the cell)
질문 사항이 있으시면 kim5953@gmail.com으로 해 주세요. Option Explicit '--------------------------------------------- Sub char_Painting() '--------------------------------------------- Dim rngX As Range: Set rngX = Range("E4").CurrentRegion Dim sKey As String: sKey = "사랑" paint_char rngX, sKey End Sub '-------------------------------------------------------------------------------- Sub paint_char(rngX As Range, sKey As String) '-------------------------------------------------------------------------------- Dim sStr As String: Dim iC As Long Dim i As Long Dim cell As Range For Each cell In rngX.Cells sStr = cell.Value iC = 1 Do While not(iC= 0) iC = InStr(iC, sStr, sKey) If iC = 0 Then Exit Do With cell.Characters(iC, Len(sKey)).Font .Color = RGB(0, 0, 255) .Bold = True .Italic = True .Underline = True End With iC = iC + Len(sKey) Loop Next cell End Sub #특정 문자열 찾아 색깔 입히기