+ Reply to Thread
Results 1 to 8 of 8

How to change if ... then change font style (name, size, etc.) in a cell using function

Hybrid View

Rocky2013 How to change if ... then... 06-16-2018, 10:14 AM
avk Re: How to change if ... then... 06-16-2018, 10:37 AM
Rocky2013 Re: How to change if ... then... 06-16-2018, 12:15 PM
kuschem Re: How to change if ... then... 06-16-2018, 12:25 PM
avk Re: How to change if ... then... 06-16-2018, 04:26 PM
Rocky2013 Re: How to change if ... then... 06-16-2018, 09:42 PM
FDibbins Re: How to change if ... then... 06-16-2018, 10:29 PM
Rocky2013 Re: How to change if ... then... 06-17-2018, 06:42 AM
  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    How to change if ... then change font style (name, size, etc.) in a cell using function

    Hi,
    I want to change the font name in a cell using if then function, not using VBA.

    Examle:
    Font name in A1 = Calibri
    If A2=1, then font name in A1 will change to Arial
    If A2=2, then font name in A1 will change to Times New Roman

    Properly I will create a list of font names.

    I do not know if this can be done. If it is impossible to do with function,
    then I will take VBA. The code may have codes to change font name,
    color, bold, italic, size, etc.

    Thanks
    Last edited by Rocky2013; 06-16-2018 at 12:15 PM.

  2. #2
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,281

    Re: How to change if ... then change font style (name, size, etc.) in a cell using functio

    If "A2" is specific word, then in "B2" conditional formatting.
    >CF > Manage Rules > New Rules > Select "use a formula determine which cell to format > Type : =$A2="Your Word" > click on format > Select from Tab Font/Border/Fill as per your requirement > Click "OK" > Again click "ok" > Applies to =$B$2 > click "Apply" > "ok"
    for more clarity refer attach file.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: How to change if ... then change font style (name, size, etc.) in a cell using functio

    Hi,
    Thanks for the reply. I revise the post, it is little confuse. I do not want to change the text font, but to change the font name
    using function. I think it is problem using formula instead of using VBA. I will to take VBA if it is impossible to do with formula.

    Thanks

  4. #4
    Registered User
    Join Date
    06-13-2018
    Location
    india
    MS-Off Ver
    2010;2007
    Posts
    54

    Re: How to change if ... then change font style (name, size, etc.) in a cell using functio

    Hi Rocky! Font cannot be changed using formula in conditional formatting, you need to use VBA for the same.

  5. #5
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,281

    Re: How to change if ... then change font style (name, size, etc.) in a cell using functio

    Font name change with vba.

  6. #6
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: How to change if ... then change font style (name, size, etc.) in a cell using functio

    what's the VBA code to change font style?

    Thanks

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: How to change if ... then change font style (name, size, etc.) in a cell using functio

    So, just to be clear, you have a cell with, say Calibri, and you want to change it to Ariel?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: How to change if ... then change font style (name, size, etc.) in a cell using functio

    Yes, just like the example file.

    Thanks

+ 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. Change font format (style, size, etc.) of all cells in all worksheets
    By ok17 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2017, 09:44 AM
  2. Change font size keeping the cell size fixed
    By mayurpatil in forum Excel General
    Replies: 1
    Last Post: 07-09-2015, 01:52 PM
  3. [SOLVED] VBA to move cusor pointer/change cell color/font style
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2015, 08:42 AM
  4. How to change the font style in if function
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-13-2013, 01:40 AM
  5. Replies: 1
    Last Post: 11-08-2013, 04:16 AM
  6. How to using comma style without change font & font size
    By rameshtupe in forum Excel General
    Replies: 1
    Last Post: 07-11-2013, 01:19 PM
  7. change font color and font style in shape
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2011, 10: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