Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I only want the condtional formatting to apply to the part of the text that
equals "PCC". For example, the value of the cell may be, "Jane Smith - PCC" and I only want PCC to be bold and green and Jane Smith to remain the same. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That would require VBA coding. Theres no way to do that with the normal
conditional formatting that excel gives you. "klkropf" wrote: I only want the condtional formatting to apply to the part of the text that equals "PCC". For example, the value of the cell may be, "Jane Smith - PCC" and I only want PCC to be bold and green and Jane Smith to remain the same. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Do you know what the VBA code would be?
"akphidelt" wrote: That would require VBA coding. Theres no way to do that with the normal conditional formatting that excel gives you. "klkropf" wrote: I only want the condtional formatting to apply to the part of the text that equals "PCC". For example, the value of the cell may be, "Jane Smith - PCC" and I only want PCC to be bold and green and Jane Smith to remain the same. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
to be honest I've never done this before so I really do not know. I imagine
you would have to loop through the range of cells everytime, search the cell for the given word you want using StrComp or something, then some how select the word within the sentence using some kind of find and range formulas and then change the color to whatever you want. It's possible but I'm not the man for the answer "klkropf" wrote: Do you know what the VBA code would be? "akphidelt" wrote: That would require VBA coding. Theres no way to do that with the normal conditional formatting that excel gives you. "klkropf" wrote: I only want the condtional formatting to apply to the part of the text that equals "PCC". For example, the value of the cell may be, "Jane Smith - PCC" and I only want PCC to be bold and green and Jane Smith to remain the same. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub Bold_String()
Dim rng As Range Dim Cell As Range Dim start_str As Integer Set rng = Selection For Each Cell In rng start_str = InStr(Cell.Value, "PCC") If start_str Then With Cell.Characters(start_str, 3).Font .Bold = True .ColorIndex = 10 End With End If Next End Sub Gord Dibben MS Excel MVP On Mon, 5 May 2008 16:08:01 -0700, klkropf wrote: Do you know what the VBA code would be? "akphidelt" wrote: That would require VBA coding. Theres no way to do that with the normal conditional formatting that excel gives you. "klkropf" wrote: I only want the condtional formatting to apply to the part of the text that equals "PCC". For example, the value of the cell may be, "Jane Smith - PCC" and I only want PCC to be bold and green and Jane Smith to remain the same. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Wow, I just tested that out... that is pretty sweet.
"Gord Dibben" wrote: Sub Bold_String() Dim rng As Range Dim Cell As Range Dim start_str As Integer Set rng = Selection For Each Cell In rng start_str = InStr(Cell.Value, "PCC") If start_str Then With Cell.Characters(start_str, 3).Font .Bold = True .ColorIndex = 10 End With End If Next End Sub Gord Dibben MS Excel MVP On Mon, 5 May 2008 16:08:01 -0700, klkropf wrote: Do you know what the VBA code would be? "akphidelt" wrote: That would require VBA coding. Theres no way to do that with the normal conditional formatting that excel gives you. "klkropf" wrote: I only want the condtional formatting to apply to the part of the text that equals "PCC". For example, the value of the cell may be, "Jane Smith - PCC" and I only want PCC to be bold and green and Jane Smith to remain the same. |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks, I can get it to work if PCC is actually typed in the cell, but I'm
using a Vlookup to return the value. Will it work when doing that? "Gord Dibben" wrote: Sub Bold_String() Dim rng As Range Dim Cell As Range Dim start_str As Integer Set rng = Selection For Each Cell In rng start_str = InStr(Cell.Value, "PCC") If start_str Then With Cell.Characters(start_str, 3).Font .Bold = True .ColorIndex = 10 End With End If Next End Sub Gord Dibben MS Excel MVP On Mon, 5 May 2008 16:08:01 -0700, klkropf wrote: Do you know what the VBA code would be? "akphidelt" wrote: That would require VBA coding. Theres no way to do that with the normal conditional formatting that excel gives you. "klkropf" wrote: I only want the condtional formatting to apply to the part of the text that equals "PCC". For example, the value of the cell may be, "Jane Smith - PCC" and I only want PCC to be bold and green and Jane Smith to remain the same. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Not unless you were to change the cell to a value.
You cannot format parts of formula results. Gord On Mon, 5 May 2008 17:18:01 -0700, klkropf wrote: Thanks, I can get it to work if PCC is actually typed in the cell, but I'm using a Vlookup to return the value. Will it work when doing that? "Gord Dibben" wrote: Sub Bold_String() Dim rng As Range Dim Cell As Range Dim start_str As Integer Set rng = Selection For Each Cell In rng start_str = InStr(Cell.Value, "PCC") If start_str Then With Cell.Characters(start_str, 3).Font .Bold = True .ColorIndex = 10 End With End If Next End Sub Gord Dibben MS Excel MVP On Mon, 5 May 2008 16:08:01 -0700, klkropf wrote: Do you know what the VBA code would be? "akphidelt" wrote: That would require VBA coding. Theres no way to do that with the normal conditional formatting that excel gives you. "klkropf" wrote: I only want the condtional formatting to apply to the part of the text that equals "PCC". For example, the value of the cell may be, "Jane Smith - PCC" and I only want PCC to be bold and green and Jane Smith to remain the same. |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
@Gord Dibben Thanks a lot for your Code.....it helped a lot :)
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Formatting part 2 | Excel Worksheet Functions | |||
Subtotals & Conditional Formatting Part 2 | Excel Worksheet Functions | |||
conditional formatting "if part of cell contents contains string" | Excel Worksheet Functions | |||
Conditional formatting for part of a cell | Excel Discussion (Misc queries) | |||
Conditional Formatting - part of cell only | Excel Discussion (Misc queries) |