Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: 2 sperate Font sizes in the same cell

  1. #11
    Board Regular
    Join Date
    Oct 2014
    Posts
    336
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: 2 sperate Font sizes in the same cell

    Hi Dave changed the sheet name, and still can not run as a macro.. i open up the macro and its empty?
    also the code being specific would need to change November was an example the other rows below are charlie, foxtrot, yankee zulu ect..ect

  2. #12
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,228
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: 2 sperate Font sizes in the same cell

    Quote Originally Posted by mingandmong View Post
    Hi Fluff thankyou for your hard work.. the result is what i wanted, but it deletes my formula's in column j so i cannot use the same rows again
    i will post another example there may be annother way to get my desired results thanks once again
    AFAIK there is no way of doing what you want if the cell contains a formula. Which is why I converted the formula into values.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #13
    Board Regular
    Join Date
    Oct 2014
    Posts
    336
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: 2 sperate Font sizes in the same cell

    Thank-you Fluff for all your help,
    Its working fine... i just copy and paste column "J" with the origanal formula's via another macro after every time i run your macro

  4. #14
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,228
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: 2 sperate Font sizes in the same cell

    Glad we could help & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  5. #15
    Board Regular FracinDean's Avatar
    Join Date
    Jul 2011
    Location
    Texas
    Posts
    65
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: 2 sperate Font sizes in the same cell

    Quote Originally Posted by Fluff View Post
    You cannot do that via a formula, but this macro should do what you want
    Code:
    Sub FontSize()
       
       Dim Cl As Range
       
       For Each Cl In Range("J2", Range("J" & Rows.Count).End(xlUp))
          With Cl
             .Value = .Value
             .Font.Name = "Arial"
             .Font.size = 20
          .Characters(1, 1).Font.size = 128
          End With
       Next Cl
       
    End Sub
    Thank you for this very useful code Fluff. I have always wanted to be able to change the font of part of a cell's contents using code, and the .Characters attribute is the magic piece I needed. Below is an example where I used it to subscript part of a cell. I think I will be able to generalize it by making the starting cell and ending cell parameters in the function, and maybe also using a parameter for what I want to change (subscript or superscript etc.0. Very helpful!

    Code:
    Dim Cl As Range
    For Each Cl In Range("rType")
    With Cl
       .Characters(13, 17).Font.Subscript = True
    End With
    Next Cl
    

  6. #16
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,228
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: 2 sperate Font sizes in the same cell

    Glad it helped you & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

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
  •