+ Reply to Thread
Results 1 to 16 of 16

Convert to Bold Fonts in a concatenated text

  1. #1
    Registered User
    Join Date
    03-06-2011
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    46

    Convert to Bold Fonts in a concatenated text

    Hi,

    I am working on preparing a tool for documentation using excel. I have verified the forums available resources to find out my requirement, but I am not able to figure out. In the documentation part, I am using concatenate formulas to combine the texts, numbers,etc. In some paragraph of the text document, there are some words,phrases that has to be highlighted using bold fonts. Although, I know that using concatenate function, part of the texts appearing in paragraphs, can't be converted into bold fonts. But using vba it is possible to accomplish this task. I need vba code for this. Will you please help me to figure out this issue? I attach an example. In the example contents in A1 is a concatenated text. Items furnished below A1 needs to be changed into bold character fonts. I

    lts_ram
    Attached Files Attached Files
    Last edited by lts_ram; 03-19-2016 at 03:08 PM.

  2. #2
    Registered User
    Join Date
    12-14-2012
    Location
    Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Convert to Bold Fonts in a concatenated text

    Hello lts_ram,

    looking at the file I don't know how you are suppose to get which word you need to highlight? If there is no pattern and you need to make a list of words to highlight then you can do manually within the text straight away...
    And the list from A4:A7 are not punctuated correctly. So when I want to look for them in the text in A1 I don't find them.
    For example:
    list / text
    1539.64 sq.ft / 1539.64 sq. ft. > there is missing space...
    etc.

    Sorry if I am wrong and did not understand the quest correctly.

    Regards,
    sysss

  3. #3
    Registered User
    Join Date
    12-14-2012
    Location
    Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Convert to Bold Fonts in a concatenated text

    Use this if it helps but firstly need to correct the list of words:

    Rs.450000/-(Rupees Four Lakh(s) Fifty Thousand(s)only
    1539.64 sq. ft.
    Schedule “B”
    Schedule “C”

    Please Login or Register  to view this content.
    Regards,
    sysss
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Convert to Bold Fonts in a concatenated text

    To add to syss's comments:
    If A1 is a result of a CONCATENATE formula, then VBA cannot make parts of the formula results bold. VBA can both concatenate text and make parts bold, but it cannot bold the result of a formula.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  5. #5
    Registered User
    Join Date
    12-14-2012
    Location
    Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Convert to Bold Fonts in a concatenated text

    Yes, AplhaFrog, good point, thank you.
    If it is that case then it need that formula to convert to value

    Please Login or Register  to view this content.
    Regards,
    sysss

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert to Bold Fonts in a concatenated text

    Select the cell(s) that you want to change then run the code.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-06-2011
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    46

    Re: Convert to Bold Fonts in a concatenated text

    Hi Mr. Jindon,
    Your vb code works great, but I am just a beginner to vba macros. I would like to mention here, that the part that is to be concatenated (Cells A4:A11) some times contain formulas also, in which case I could not make suitable correction in your code.
    I have written some code, which is not executing properly. I am attaching the sample work book. Hope you can understand my requirement.
    lts_ram
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert to Bold Fonts in a concatenated text

    I don't think I understand what you are trying to say.

    If you upload a workbook with EXACT data you currently have and EXACT result that you expect would help to understand.
    Last edited by jindon; 03-20-2016 at 01:52 AM.

  9. #9
    Registered User
    Join Date
    03-06-2011
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    46

    Re: Convert to Bold Fonts in a concatenated text

    Hi,

    My requirement is simple. As the file is very large, a portion of the file is attached. In B189 I want to concatenate
    a text linking H189:L189 using vb macros.
    B189 = concatenate(H1189,I189,J189,K189,L189)
    After concatenation, values in I189, K189 should appear in Bold.

    With Regards,
    lts_ram
    Attached Files Attached Files

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert to Bold Fonts in a concatenated text

    No change of the file with the one before.

    No data in B189
    Last edited by jindon; 03-20-2016 at 04:14 AM.

  11. #11
    Registered User
    Join Date
    03-06-2011
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    46

    Re: Convert to Bold Fonts in a concatenated text

    Hi Mr Jindon
    Please refer to next sheet named "SaleDeed".

    With Regards,
    lts_ram

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert to Bold Fonts in a concatenated text

    There is no sheet besides "Sheet1".

  13. #13
    Registered User
    Join Date
    03-06-2011
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    46

    Re: Convert to Bold Fonts in a concatenated text

    Hi,

    I am once again attaching the work book afresh
    Attached Files Attached Files

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert to Bold Fonts in a concatenated text

    Again, it is the same.

    Wait for some else who can see the file correctly, if your file has more than one sheet.

  15. #15
    Registered User
    Join Date
    03-06-2011
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    46

    Re: Convert to Bold Fonts in a concatenated text

    Hi Jindon,

    I am extremely sorry. I failed to upload a modified file. Again & again I have been uploading earlier one, thinking it is modified one. Sorry to trouble you again.
    Attached Files Attached Files

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Convert to Bold Fonts in a concatenated text

    So what's wrong when you run my code?

    I must go out now, so my next reply will be late.
    Last edited by jindon; 03-20-2016 at 05:34 AM.

+ 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. VBA to format bold a concatenated string
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-16-2016, 04:18 AM
  2. Help with VBA to make concatenated Excel formula text appear in bold...
    By ArsenalCityGent in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2015, 01:55 PM
  3. Convert Concatenated Text to Formula
    By TristanRicAlindogan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-13-2013, 12:38 AM
  4. Format (bold, etc) concatenated items
    By erikilacad in forum Excel General
    Replies: 10
    Last Post: 12-27-2011, 01:51 PM
  5. Convert Concatenated Text to Formula
    By locyip in forum Excel General
    Replies: 7
    Last Post: 02-04-2010, 03:39 PM
  6. bold certain concatenated text
    By HuskerBronco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2009, 05:05 AM
  7. different fonts concatenated
    By David Obeid in forum Excel General
    Replies: 1
    Last Post: 01-26-2008, 11:29 PM

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