+ Reply to Thread
Results 1 to 6 of 6

How to make Text in a Merged Cell of different Font(s) & Font Size Programmatically?

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    How to make Text in a Merged Cell of different Font(s) & Font Size Programmatically?

    How to make Text in a Merged Cell of different Font(s) & Font Size Programmatically?

    Dear Forum,

    I have a particular Form which is basically a Blank Template and which is going to be used with Dynamic Names and then further for Printing.

    The names are going to be selected from a Drop-Down and that is concatenated in the Template TEXT..

    TO make it look more Authentic I want to haev this Text in a Different Font and Larger Font Size than the remaining text..

    Ex:-

    Cell B6 =

    Received with thanks from MR. SACHIN RAMESH TENDULKAR a return of income and/or return of fringe benefits in Form No. ITR … for assessment year 2009-10, having the following particulars.

    AS you can see the reamaining text is of normal Times New Roman Font and regular Font Size.

    This TExt is Pulled from a DropDown connected to a List Names in the cell U1.

    U1= MR. SACHIN RAMESH TENDULKAR

    ="Received with thanks from"& MR. SACHIN RAMESH TENDULKAR &"a return of income and/or return of fringe benefits in Form No. ITR … for assessment year 2009-10, having the following particulars."

    So ,how DO i manage this difference in Font(s) and FOnt Size in a single cell which is Merged.

    Warm Regards
    e4excel
    Last edited by e4excel; 04-22-2011 at 09:54 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to make Text in a Merged Cell of different Font(s) & Font Size Programmatical

    Try this
    Please Login or Register  to view this content.

    Run the macro FormatText.

    If you need help with colour indeces run the macro GetColorIndex, this will fill ColumnA with the available colours and their index number.

    Hope this helps
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: How to make Text in a Merged Cell of different Font(s) & Font Size Programmatical

    Quote Originally Posted by Marcol View Post

    If you need help with colour indices run the macro GetColorIndex, this will fill ColumnA with the available colours and their index number.

    Hope this helps
    Dear Marcol,

    Thats indeed very useful and exactly what I was looking out for and actually more than expected..

    The Colour Index Column is very useful to choose a color for the result..

    Just also wanted to know can we also have the Names of the Colors in the cell alongwith their Nos for reference..

    Like RED - 3, BLACK - 1 etc.

    As far as this query is concerned you have already solved even I managed to do it on my own but pretty shabbily..

    Please Login or Register  to view this content.
    Must say your code is sleek and concise..

    Thanks once again I ahve reped u already..

    Warm Regards
    e4excel

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to make Text in a Merged Cell of different Font(s) & Font Size Programmatical

    There are only a few colours with names
    0 Black
    1 White
    2 Red
    3 Green
    4 Blue
    5 Yellow
    6 Magenta
    7 Cyan

    The remainder can have names in html but this varies and only complicates things.

  5. #5
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: How to make Text in a Merged Cell of different Font(s) & Font Size Programmatical

    Ok no issues!

    Thought as much, the only problem arises when you try to match some colours visually and they do not match with the nos in Excel 97-2003 and 2007 versions,

    Warm Regards
    e4excel

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to make Text in a Merged Cell of different Font(s) & Font Size Programmatical

    That can often be because there are different pallettes and theme colours involved. As I recall only the first 8 are consistantly and uniquely numbered.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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