Thanks Thanks:  0
Likes Likes:  0
Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27

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

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

    Default

    Jay,

    Will that work for Excel 2000? It says it's for Excel 97.

  2. #22
    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

    Hi,

    I don't have 200 to test, but I am pretty sure it will work. Probably XP, too, although I don't know the exact answer.

    Bye,
    Jay

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

    Default

    Tried it in EXCEL 2000 it works. But I installed it twice, once for me and another time to show how to do it to a collegue and now I have the add-in showing up twice on my Tools toolbar, how do I get rid of one?

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

    Default

    Got rid of one, how do I get rid of the other?

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

    Default

    Here's a link to Part 2. I started a new thread as this one has gotten pretty big.

    http://www.mrexcel.com/board/viewtop...941&forum=2&10

  6. #26
    New Member
    Join Date
    Sep 2011
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Superscript Subscript - part of a cell - using VBA

    Hey. Ironically I came to this thread initially to get an answer for my own problems which were quite similar. Anyway, try this code. What it does is basically catches all the numericals from the string and subscripts them.

    Hopefully it would be useful for you if you just want to subscript cubes and squares.


    Sub Numeric_subscriptor()
    Dim rng As Range
    Dim i, i_n As Integer
    For Each rng In Selection
    i_n = Len(rng)
    i = 1
    Do While i <= i_n
    i = i + 1
    If IsNumeric(Mid(rng, i, 1)) = True Then
    With rng.Characters(i, 1).Font
    .Subscript = True
    End With
    End If
    Loop
    Next rng
    End Sub

  7. #27
    New Member
    Join Date
    Dec 2012
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Superscript Subscript - part of a cell - using VBA

    I think I just found a webpage detailing exactly what this thread (ancient, I know) was looking for. I didn't test it, but it seems to be using a custom user-form with buttons to super or sub just the selection.
    Creating Superscript and Subscript Buttons (Microsoft Excel)

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
  •