Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

formatting text which is in text formula

  Asked By: Pamela    Date: Mar 20    Category: MS Office    Views: 1235
  

formatting text which is in text formula
problem: how to format text which is in formula

i have data in

column A column B

F a
F b
F c

i want result in column C (to combine column A & B)

Fa "in which a is as variable & should be as subscript"
Fb "in which b is as variable & should be as subscript"
Fc "in which c is as variable & should be as subscript"

or is there any formula from which i can format text which is in
formula?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Robin Bailey     Answered On: Mar 20

Such a feat cannot be done without using VBA. You can only apply a
font change to the entire cell if it contains a formula. If the cell
is not a formula  then you can have different font styles for each
character.

So, for column  C the value would need to be static before you can
apply a subscript change to the 2nd character.

This routine would change the Active Cell as you want...

ActiveCell.Copy
ActiveCell.PasteSpecial Paste:=xlPasteValues
ActiveCell.Characters(2, 1).Font.Subscript = True

You could place this in a loop to change all of column C at one time.
Just one method...

 
Didn't find what you were looking for? Find more on formatting text which is in text formula Or get search suggestion and latest updates.




Tagged: