Question

  • Thread starter Thread starter LeGrow29
  • Start date Start date
L

LeGrow29

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
 
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
 
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 said:
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


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
 
I understand.

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

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

XL2002, WinXP


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 said:
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


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
 
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



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 said:
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


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
 
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 said:
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



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 said:
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


:

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
 
"With objCell.Characters(InStr(1, objCell.Value, strAux), Len(strAux)).Font"
is only one line



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 said:
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



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


:

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
 
Got it. Thanks so much!!!!!!


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



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 said:
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



<[email protected]> escreveu na mensagem
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


:

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top