Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default conditional formatting only applies to part of cell text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default conditional formatting only applies to part of cell text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default conditional formatting only applies to part of cell text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default conditional formatting only applies to part of cell text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default conditional formatting only applies to part of cell text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default conditional formatting only applies to part of cell text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default conditional formatting only applies to part of cell text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default conditional formatting only applies to part of cell text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Partial Formatting

Gord:

Your previous post was very helpful! Is it possible to format part of a cell if the cell contains both values and formulas?

I'd like to format only the letter J in the following:

= ("J ") &TEXT(B18+TIME(0,6,0),"h:mm")

Thanks,
Jonathan



Gord Dibben wrote:

Not unless you were to change the cell to a value.
05-May-08

Not unless you were to change the cell to a value.

You cannot format parts of formula results.


Gord

wrote:

Previous Posts In This Thread:

On Monday, May 05, 2008 6:46 PM
klkrop wrote:

conditional formatting only applies to part of cell text
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.

On Monday, May 05, 2008 6:51 PM
akphidel wrote:

That would require VBA coding.
That would require VBA coding. Theres no way to do that with the normal
conditional formatting that excel gives you.

"klkropf" wrote:

On Monday, May 05, 2008 7:08 PM
klkrop wrote:

conditional formatting only applies to part of cell text
Do you know what the VBA code would be?

"akphidelt" wrote:

On Monday, May 05, 2008 7:28 PM
akphidel wrote:

to be honest I've never done this before so I really do not know.
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:

On Monday, May 05, 2008 7:37 PM
Gord Dibben wrote:

Sub Bold_String()Dim rng As RangeDim Cell As RangeDim start_str As Integer
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:

On Monday, May 05, 2008 7:52 PM
akphidel wrote:

conditional formatting only applies to part of cell text
Wow, I just tested that out... that is pretty sweet.

"Gord Dibben" wrote:

On Monday, May 05, 2008 8:18 PM
klkrop wrote:

Thanks, I can get it to work if PCC is actually typed in the cell, but I'm
Thanks, I can get it to work if PCC is actually typed in the cell, but I am
using a Vlookup to return the value. Will it work when doing that?

"Gord Dibben" wrote:

On Monday, May 05, 2008 8:37 PM
Gord Dibben wrote:

Not unless you were to change the cell to a value.
Not unless you were to change the cell to a value.

You cannot format parts of formula results.


Gord

wrote:


Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET MVC RC2
http://www.eggheadcafe.com/tutorials...t-mvc-rc2.aspx
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Partial Formatting

Jonathan,

You cannot do that with a formula - but you can use event code to apply the format to a value.

HTH,
Bernie
MS Excel MVP


<GD104 wrote in message ...
Gord:

Your previous post was very helpful! Is it possible to format part of a cell if the cell contains
both values and formulas?

I'd like to format only the letter J in the following:

= ("J ") &TEXT(B18+TIME(0,6,0),"h:mm")

Thanks,
Jonathan



Gord Dibben wrote:

Not unless you were to change the cell to a value.
05-May-08

Not unless you were to change the cell to a value.

You cannot format parts of formula results.


Gord

wrote:

Previous Posts In This Thread:

On Monday, May 05, 2008 6:46 PM
klkrop wrote:

conditional formatting only applies to part of cell text
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.

On Monday, May 05, 2008 6:51 PM
akphidel wrote:

That would require VBA coding.
That would require VBA coding. Theres no way to do that with the normal
conditional formatting that excel gives you.

"klkropf" wrote:

On Monday, May 05, 2008 7:08 PM
klkrop wrote:

conditional formatting only applies to part of cell text
Do you know what the VBA code would be?

"akphidelt" wrote:

On Monday, May 05, 2008 7:28 PM
akphidel wrote:

to be honest I've never done this before so I really do not know.
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:

On Monday, May 05, 2008 7:37 PM
Gord Dibben wrote:

Sub Bold_String()Dim rng As RangeDim Cell As RangeDim start_str As Integer
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:

On Monday, May 05, 2008 7:52 PM
akphidel wrote:

conditional formatting only applies to part of cell text
Wow, I just tested that out... that is pretty sweet.

"Gord Dibben" wrote:

On Monday, May 05, 2008 8:18 PM
klkrop wrote:

Thanks, I can get it to work if PCC is actually typed in the cell, but I'm
Thanks, I can get it to work if PCC is actually typed in the cell, but I am
using a Vlookup to return the value. Will it work when doing that?

"Gord Dibben" wrote:

On Monday, May 05, 2008 8:37 PM
Gord Dibben wrote:

Not unless you were to change the cell to a value.
Not unless you were to change the cell to a value.

You cannot format parts of formula results.


Gord

wrote:


Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET MVC RC2
http://www.eggheadcafe.com/tutorials...t-mvc-rc2.aspx





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Partial Formatting

Not until you copy and paste special as a value.

Or use VBA

What value is in B18?


Gord


On Mon, 30 Nov 2009 08:38:15 -0800, GD104 wrote:

Gord:

Your previous post was very helpful! Is it possible to format part of a cell if the cell contains both values and formulas?

I'd like to format only the letter J in the following:

= ("J ") &TEXT(B18+TIME(0,6,0),"h:mm")

Thanks,
Jonathan



Gord Dibben wrote:

Not unless you were to change the cell to a value.
05-May-08

Not unless you were to change the cell to a value.

You cannot format parts of formula results.


Gord

wrote:

Previous Posts In This Thread:

On Monday, May 05, 2008 6:46 PM
klkrop wrote:

conditional formatting only applies to part of cell text
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.

On Monday, May 05, 2008 6:51 PM
akphidel wrote:

That would require VBA coding.
That would require VBA coding. Theres no way to do that with the normal
conditional formatting that excel gives you.

"klkropf" wrote:

On Monday, May 05, 2008 7:08 PM
klkrop wrote:

conditional formatting only applies to part of cell text
Do you know what the VBA code would be?

"akphidelt" wrote:

On Monday, May 05, 2008 7:28 PM
akphidel wrote:

to be honest I've never done this before so I really do not know.
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:

On Monday, May 05, 2008 7:37 PM
Gord Dibben wrote:

Sub Bold_String()Dim rng As RangeDim Cell As RangeDim start_str As Integer
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:

On Monday, May 05, 2008 7:52 PM
akphidel wrote:

conditional formatting only applies to part of cell text
Wow, I just tested that out... that is pretty sweet.

"Gord Dibben" wrote:

On Monday, May 05, 2008 8:18 PM
klkrop wrote:

Thanks, I can get it to work if PCC is actually typed in the cell, but I'm
Thanks, I can get it to work if PCC is actually typed in the cell, but I am
using a Vlookup to return the value. Will it work when doing that?

"Gord Dibben" wrote:

On Monday, May 05, 2008 8:37 PM
Gord Dibben wrote:

Not unless you were to change the cell to a value.
Not unless you were to change the cell to a value.

You cannot format parts of formula results.


Gord

wrote:


Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET MVC RC2
http://www.eggheadcafe.com/tutorials...t-mvc-rc2.aspx


  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Partial Formatting

You would need to do this with VBA. What cell or cells have the formula you
are showing? What formatting do you want to do to the letter "J"? Can this
letter be more than one character?

--
Rick (MVP - Excel)


"GD104" wrote in message ...
Gord:

Your previous post was very helpful! Is it possible to format part of a
cell if the cell contains both values and formulas?

I'd like to format only the letter J in the following:

= ("J ") &TEXT(B18+TIME(0,6,0),"h:mm")

Thanks,
Jonathan


  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default conditional formatting only applies to part of cell text

@Gord Dibben Thanks a lot for your Code.....it helped a lot :)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting part 2 Arturo Excel Worksheet Functions 1 June 28th 07 06:34 PM
Subtotals & Conditional Formatting Part 2 Studebaker Excel Worksheet Functions 1 May 17th 07 09:19 AM
conditional formatting "if part of cell contents contains string" tom ossieur Excel Worksheet Functions 1 March 13th 07 11:11 AM
Conditional formatting for part of a cell Marie Bayes Excel Discussion (Misc queries) 7 September 8th 06 06:47 PM
Conditional Formatting - part of cell only RobDDrums Excel Discussion (Misc queries) 1 January 9th 06 11:11 PM


All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"