ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Question (https://www.excelbanter.com/excel-discussion-misc-queries/109800-question.html)

[email protected]

Question
 
Say if I want to do a search and replace: for example "Marriages -
Public License" and I want to replace the word "Marriages" with the
same word only in red and bold, can I do it without the whole thing
being red and bold? I tried to do it but the whole thing turns red and
bold and I only want the one word changed.

Any ideas on how I can do that?

Thanks


Ron Coderre

Question
 
Try this:

In the formula bar, use the mouse pointer to highlight the text.
Right-click and select "Format Cells" from the popup menu.
Select the font color and bold and click the [OK] button.
Press [enter]

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

Say if I want to do a search and replace: for example "Marriages -
Public License" and I want to replace the word "Marriages" with the
same word only in red and bold, can I do it without the whole thing
being red and bold? I tried to do it but the whole thing turns red and
bold and I only want the one word changed.

Any ideas on how I can do that?

Thanks



[email protected]

Question
 
There are multiple instances of this so it wouldn't help to go to each
one and do that. That is why I want to use the search and replace
feature.


Ron Coderre wrote:
Try this:

In the formula bar, use the mouse pointer to highlight the text.
Right-click and select "Format Cells" from the popup menu.
Select the font color and bold and click the [OK] button.
Press [enter]

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

Say if I want to do a search and replace: for example "Marriages -
Public License" and I want to replace the word "Marriages" with the
same word only in red and bold, can I do it without the whole thing
being red and bold? I tried to do it but the whole thing turns red and
bold and I only want the one word changed.

Any ideas on how I can do that?

Thanks




Ron Coderre

Question
 
I understand.

I don't believe you can do what you're asking without using a VBA procedure.

***********
Regards,
Ron

XL2002, WinXP


" wrote:

There are multiple instances of this so it wouldn't help to go to each
one and do that. That is why I want to use the search and replace
feature.


Ron Coderre wrote:
Try this:

In the formula bar, use the mouse pointer to highlight the text.
Right-click and select "Format Cells" from the popup menu.
Select the font color and bold and click the [OK] button.
Press [enter]

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

Say if I want to do a search and replace: for example "Marriages -
Public License" and I want to replace the word "Marriages" with the
same word only in red and bold, can I do it without the whole thing
being red and bold? I tried to do it but the whole thing turns red and
bold and I only want the one word changed.

Any ideas on how I can do that?

Thanks





Rodrigo Ferreira

Question
 
I think you want something like this:

Sub Test()
Dim objCell As Range

strAux = "Marriages"

For Each objCell In Selection
If InStr(1, objCell.Value, strAux) 0 Then
With objCell.Characters(InStr(1, objCell.Value, strAux),
Len(strAux)).Font
.FontStyle = "Bold"
.ColorIndex = 3
End With
End If
Next

End Sub



escreveu na mensagem
ups.com...
There are multiple instances of this so it wouldn't help to go to each
one and do that. That is why I want to use the search and replace
feature.


Ron Coderre wrote:
Try this:

In the formula bar, use the mouse pointer to highlight the text.
Right-click and select "Format Cells" from the popup menu.
Select the font color and bold and click the [OK] button.
Press [enter]

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

Say if I want to do a search and replace: for example "Marriages -
Public License" and I want to replace the word "Marriages" with the
same word only in red and bold, can I do it without the whole thing
being red and bold? I tried to do it but the whole thing turns red and
bold and I only want the one word changed.

Any ideas on how I can do that?

Thanks






[email protected]

Question
 
I tried it but it highlights the part "With objCell.Characters(InStr(1,
objCell.Value, strAux), " and it shows it in red and it also shows the
part "Len(strAux)).Font" in red
and then I get an error message that says "compile error: Syntax
error"

Rodrigo Ferreira wrote:
I think you want something like this:

Sub Test()
Dim objCell As Range

strAux = "Marriages"

For Each objCell In Selection
If InStr(1, objCell.Value, strAux) 0 Then
With objCell.Characters(InStr(1, objCell.Value, strAux),
Len(strAux)).Font
.FontStyle = "Bold"
.ColorIndex = 3
End With
End If
Next

End Sub



escreveu na mensagem
ups.com...
There are multiple instances of this so it wouldn't help to go to each
one and do that. That is why I want to use the search and replace
feature.


Ron Coderre wrote:
Try this:

In the formula bar, use the mouse pointer to highlight the text.
Right-click and select "Format Cells" from the popup menu.
Select the font color and bold and click the [OK] button.
Press [enter]

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

Say if I want to do a search and replace: for example "Marriages -
Public License" and I want to replace the word "Marriages" with the
same word only in red and bold, can I do it without the whole thing
being red and bold? I tried to do it but the whole thing turns red and
bold and I only want the one word changed.

Any ideas on how I can do that?

Thanks





Rodrigo Ferreira

Question
 
"With objCell.Characters(InStr(1, objCell.Value, strAux), Len(strAux)).Font"
is only one line



escreveu na mensagem
ups.com...
I tried it but it highlights the part "With objCell.Characters(InStr(1,
objCell.Value, strAux), " and it shows it in red and it also shows the
part "Len(strAux)).Font" in red
and then I get an error message that says "compile error: Syntax
error"

Rodrigo Ferreira wrote:
I think you want something like this:

Sub Test()
Dim objCell As Range

strAux = "Marriages"

For Each objCell In Selection
If InStr(1, objCell.Value, strAux) 0 Then
With objCell.Characters(InStr(1, objCell.Value, strAux),
Len(strAux)).Font
.FontStyle = "Bold"
.ColorIndex = 3
End With
End If
Next

End Sub



escreveu na mensagem
ups.com...
There are multiple instances of this so it wouldn't help to go to each
one and do that. That is why I want to use the search and replace
feature.


Ron Coderre wrote:
Try this:

In the formula bar, use the mouse pointer to highlight the text.
Right-click and select "Format Cells" from the popup menu.
Select the font color and bold and click the [OK] button.
Press [enter]

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

Say if I want to do a search and replace: for example "Marriages -
Public License" and I want to replace the word "Marriages" with the
same word only in red and bold, can I do it without the whole thing
being red and bold? I tried to do it but the whole thing turns red
and
bold and I only want the one word changed.

Any ideas on how I can do that?

Thanks







[email protected]

Question
 
Got it. Thanks so much!!!!!!


Rodrigo Ferreira wrote:
"With objCell.Characters(InStr(1, objCell.Value, strAux), Len(strAux)).Font"
is only one line



escreveu na mensagem
ups.com...
I tried it but it highlights the part "With objCell.Characters(InStr(1,
objCell.Value, strAux), " and it shows it in red and it also shows the
part "Len(strAux)).Font" in red
and then I get an error message that says "compile error: Syntax
error"

Rodrigo Ferreira wrote:
I think you want something like this:

Sub Test()
Dim objCell As Range

strAux = "Marriages"

For Each objCell In Selection
If InStr(1, objCell.Value, strAux) 0 Then
With objCell.Characters(InStr(1, objCell.Value, strAux),
Len(strAux)).Font
.FontStyle = "Bold"
.ColorIndex = 3
End With
End If
Next

End Sub



escreveu na mensagem
ups.com...
There are multiple instances of this so it wouldn't help to go to each
one and do that. That is why I want to use the search and replace
feature.


Ron Coderre wrote:
Try this:

In the formula bar, use the mouse pointer to highlight the text.
Right-click and select "Format Cells" from the popup menu.
Select the font color and bold and click the [OK] button.
Press [enter]

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

Say if I want to do a search and replace: for example "Marriages -
Public License" and I want to replace the word "Marriages" with the
same word only in red and bold, can I do it without the whole thing
being red and bold? I tried to do it but the whole thing turns red
and
bold and I only want the one word changed.

Any ideas on how I can do that?

Thanks







All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com