Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Manju wrote...
.... I meant to change a vast range of cells which has other persons initials also along with mine (SM) in a single cell to know all the places where my name is appearing. If i need to select each cell individually and change the formatting it doesn't serve my purpose. I hope you have a solution. The only way to make batch formatting changes to SUBSTRINGS of cell contents is by macro. If you're willing to use macros, and if the initials you want to change are SM always appearing between the first and second instance of /, and if you preselect the cells involved, you could use the following macro. Sub foo() Const INITIALS As String = "hg" & "/" Dim c As Range, s As String, n As Long, p As Long If Not TypeOf Selection Is Range Then Exit Sub n = Len(INITIALS) For Each c In Selection s = c.Text p = InStr(1, s, "/") + 1 If p 1 And Mid(s, p, n) = INITIALS Then With c.Characters(p, n - 1) .Font.Bold = True .Font.Italic = True .Font.ColorIndex = 5 'blue - change as needed End With End If Next c End Sub How do I attach a excel file if I want to show you the actual spreadsheet with problem ? Don't. I don't open files from people I don't know, and anyone else with any sense would also refuse to open your file. Plain text descriptions are almost always sufficient. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy from a Cell to a text box. | Excel Worksheet Functions | |||
The number in this cell is formatted as text or preceded by an apostrophe" problem in Excel | Excel Discussion (Misc queries) | |||
Cell Capacity - text | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions | |||
Append Text to Cell Values Using Replace | Excel Discussion (Misc queries) |