Power Query Course in Spanish
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Superscript Subscript - part of a cell - using VBA

  1. #11
    Board Regular
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    359
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Mudface,

    That's what I thought, but I thought I'd give a chance to the GURUs here to prove me wrong!

    I now know that you can just use ctrl-1 and choose the box, but it would be satisfying to learn how to get around it. (if at all possible).

    Come on!, people! PROVE ME WRONG!!

  2. #12
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You can't even activate a macro and keep cell active in the "edit" state. If you see what I mean. If you don't then

  3. #13
    Board Regular
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    359
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Mark O' Brien,

    Oh, well... at least now I know what CAN'T be done in excel.


  4. #14
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Guys

    glad you responded to my post!!!!!

    Like i say in all my posts these are thinks i do or have done, i guess im wrong then!

    I guess you do not want the script!

    If you dont respond i will not know if youhave read my post or if you wish to respond.

    Im not saying respond to me only of cause but ive offered help and you do not have an answer do you!

    maybe what i post is of some value.. not having a go,.. but im sure your see my point.... maybe ill bother to find this code or maybe not

    NUT you know only to wel my name and love or hate me ill help if i can.......
    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  5. #15
    Board Regular
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    359
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    How about using an inputbox to choose part of the cell?

    Or using an inputbox to ask you to choose the cell,
    THEN counts number of characters,
    THEN asks you where to start and stop the supercript or subscript,
    THEN asked if you want to superscript or subscript
    THEN asks if you want to superscript/subscript (depending on what was choosen) "selectect text"(have excel store the text part selected for formatting),
    THEN carries it out?

    Is this possible?

    Here's some code to get people started..

    Range("A1").Select
    ActiveCell.FormulaR1C1 = "m3"
    With ActiveCell.Characters(Start:=1, Length:=1).Font
    .Name = "Arial"
    .FontStyle = "Regular"
    .Size = 10
    .Strikethrough = False
    .Superscript = False
    .Subscript = False
    .OutlineFont = False
    .Shadow = False
    .Underline = xlUnderlineStyleNone
    .ColorIndex = xlAutomatic
    End With

    'Use inputbox?
    With ActiveCell.Characters(Start:=2, Length:=1).Font
    .Name = "Arial"
    .FontStyle = "Regular"
    .Size = 10
    .Strikethrough = False
    .Superscript = True
    .Subscript = False
    .OutlineFont = False
    .Shadow = False
    .Underline = xlUnderlineStyleNone
    .ColorIndex = xlAutomatic
    End With
    Range("D7").Select
    End Sub


    I know it would probably be better to use CTRL-1 and just click the apporpriate box, but I want to know if this would work. And hopefully learn some VBA along the way.

    Probably won't since I don't know much about writing VBA, but I had to ask!

    [ This Message was edited by: cosmos75 on 2002-04-19 12:26 ]

    [ This Message was edited by: Cosmos75 on 2002-04-19 12:59 ]

  6. #16
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  7. #17
    Board Regular
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    359
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Jack in the UK,

    Sure I would love your help. I did see your post in the other topic so I thought that your answer would be like the other answers here, that it would apply to the whole cell and not part of it.

  8. #18
    Board Regular
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    359
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    anyone?

  9. #19
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry been busy i do track my work best i can ill post on here ASAP and send it over in private or email as well, ASAP

    have a play it does work

    say Jack in the UK postes on MrExcel

    then you can highlight th UK in red or suprescript it, i used it for dates say 20th so the th supered buthe date was not at the start or the text string if you get me IE

    Jack in the UK 20th April 2002 postes on MrExcel

    you want the *th* super script?
    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  10. #20
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Joh Walkenbach has written an add-in which is probably the best option for you. Still will require manual intervention, but made much easier.

    http://j-walk.com/ss/excel/files/supersub.htm

    Bye,
    Jay

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •