Superscripting a portion of a string

  • Thread starter Thread starter Bdavis
  • Start date Start date
B

Bdavis

Hello,

I have a string in a cell as follows =vlookup(A1,Range,2,
False)&" 5"

The five on the end is suppose to be a footnote so I would
like it to superscript. What is the correct syntax?

Thanks,

Ben
 
Hi Ben
this is not possible with formulas. Formulas only return the value of a
cell and not the format. So no chance with formulas
 
Actually I'm pretty sure it's possible becasue the formula
is concatenated using "&" with a text value. I've done
this before and formated the text as a date... I just
can't rememeber the syntax and I don't know how to create
the superscript.
 
Actually I'm pretty sure it's possible becasue the formula
is concatenated using "&" with a text value. I've done
this before and formated the text as a date... I just
can't rememeber the syntax and I don't know how to create
the superscript.
 
Hi
believe me :-)
You cant apply superscript with using a formula. the only thing is you
can concatenate values. BUT they are formated with the cell format of
the cell the formula resides in!
 
You can't do it in a FORMULA but this will give you what you want. Adjust
the start:=2 to suit. Also, you can no longer work with this number in this
form.

Sub superscriptit()
With Range("a3")
..Formula = "=vlookup(a1,b1:c3,2,0) & 5"
..Formula = .Value
..Characters(Start:=2, Length:=2).Font.Superscript = True
End With
 

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