ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   formating parts of a cell (https://www.excelbanter.com/excel-programming/324300-formating-parts-cell.html)

Chris

formating parts of a cell
 
I am trying to change the font of only part of a cell. After locating text
in a cell through find, I would like to take part of that cell and change the
font. The text I would like to change is at the same but the start location
is different. I was planning on after using the find fucnntion in VBA to use
the following function to change part of the cells font
With ActiveCell.Characters(Start:=X, Length:=4).Font
The only problem is that I need to figure out how to define X. Any ideas on
how to locate the text "(u" in a cell and record its starting position?
Thanks.

galimi[_2_]

formating parts of a cell
 
Chris,

Use the following to determine the starting position of the letter "u"

instr(intStart, strCellValue, "u")

Replace intStart with the place in the string where you would like to begin
the search, if you want to start from the beginning, set intStart to 1.
strCellValue is the cell in which we are searching for the letter u.

http://HelpExcel.com

"Chris" wrote:

I am trying to change the font of only part of a cell. After locating text
in a cell through find, I would like to take part of that cell and change the
font. The text I would like to change is at the same but the start location
is different. I was planning on after using the find fucnntion in VBA to use
the following function to change part of the cells font
With ActiveCell.Characters(Start:=X, Length:=4).Font
The only problem is that I need to figure out how to define X. Any ideas on
how to locate the text "(u" in a cell and record its starting position?
Thanks.


Don S[_3_]

formating parts of a cell
 
Chris,

Select the part of the text you want to change in the preview pane (I
think that is what it is called - the window at the top of your screen
that displays the contents of your cell). Just select it with your
mouse & change what you want. Very handy for bold, new colors, etc.

Don S

On Tue, 1 Mar 2005 07:43:06 -0800, "Chris"
wrote:

I am trying to change the font of only part of a cell. After locating text
in a cell through find, I would like to take part of that cell and change the
font. The text I would like to change is at the same but the start location
is different. I was planning on after using the find fucnntion in VBA to use
the following function to change part of the cells font
With ActiveCell.Characters(Start:=X, Length:=4).Font
The only problem is that I need to figure out how to define X. Any ideas on
how to locate the text "(u" in a cell and record its starting position?
Thanks.




All times are GMT +1. The time now is 01:21 PM.

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