+ Reply to Thread
Results 1 to 20 of 20

Format digit to superscript if ...

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Format digit to superscript if ...

    Hi!

    I would like to make a macro to format all my cells.

    I need it to format my last digit to superscrift IF there is 4 digit after decimal point.

    How to do this?

    Thanks!
    JP

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Format digit to superscript if ...

    Do the cells contain numbers or text?

    Do the cells contain formulas?

    Provide some examples?
    Last edited by shg; 06-05-2014 at 12:03 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    Numbers only. No formula.

    Thanks,
    JP

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Format digit to superscript if ...

    So if the cell contained 123.4, the 4 would be superscripted, correct?

    What about 123.45?

  5. #5
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    No only if 4 digit after point (comma ,)

    45,4563

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Format digit to superscript if ...

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    It's not doing anything.. possible?

  8. #8
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    It doesn't go through:

    If InStr(.text ....)

    Why?

  9. #9
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    Double post

  10. #10
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    SOLVED:

    Please Login or Register  to view this content.

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Format digit to superscript if ...

    Ah -- your decimal separator is a comma.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    Let's say I want the two last character. When I change to Length:=2 it doesn't work ? Still only last one.

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Format digit to superscript if ...

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    Your method is still not working. It doesn't go throuth If IntStr

  15. #15
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Format digit to superscript if ...

    Works fine for me. Post a workbook.

  16. #16
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    I think you don't understand what I want.

    I need a VBA to change ALL my value. (all different).

    What I want is, IF my number contains, 4 digits AFTER my comma. (32,3949 ... 95,3939 ... 1093,3129 .. etc) I want my VBA to put my 4th digit after comma in superscript.

    Thanks,
    JP

  18. #18
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    Here is my REAL excel file.

    There is all kind of number, text, merge etc.

    I want it to run in column D.

    https://www.dropbox.com/s/7p7q78paq0qlem1/example.xlsm

    Thanks,
    JP

  19. #19
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Format digit to superscript if ...

    This solved every of my problem..! Thanks for your help.

    Please Login or Register  to view this content.

  20. #20
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Format digit to superscript if ...

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 AM
  2. format cell 4 digit
    By choy96 in forum Excel General
    Replies: 5
    Last Post: 04-02-2013, 09:10 AM
  3. Replies: 1
    Last Post: 11-08-2005, 05:50 PM
  4. [SOLVED] Superscript in a Custom Format
    By Sloth in forum Excel General
    Replies: 1
    Last Post: 09-15-2005, 05:05 PM
  5. Superscript in custom format
    By Sloth in forum Excel General
    Replies: 2
    Last Post: 09-15-2005, 11:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1