formating parts of a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

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
 

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