+ Reply to Thread
Results 1 to 4 of 4

Retaining Text Format when using a Formula

Hybrid View

  1. #1
    Registered User
    Join Date
    02-12-2014
    Location
    Wiltshire, UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Retaining Text Format when using a Formula

    Hi, can anyone help?

    I am using the VLOOKUP function in a cell, however, I would like the value returned to also retain the text format from the table (eg colour and bold). I have attached a simple example (to demonstrate the point) where cell B14 should have the word 'French' in bold red.Example.xlsx

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,818

    Re: Retaining Text Format when using a Formula

    This cannot be done using built-in Excel functions. Based on your example I think you need a macro. Copying character-by-character formatting is more complicated than just doing it for the whole cell, so writing the macro would be a little bit of work.

    Are you open to a VBA solution?
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-12-2014
    Location
    Wiltshire, UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Retaining Text Format when using a Formula

    Hi Jeff,
    I suspected this might be the case! I'm happy to give VBA a go as I've recently been dabbling a bit with VBA, but I'm not experienced enough to dive in a write the code without a lot of research/time, so any help would be gratefully received.
    Thanks,
    Matt

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,818

    Re: Retaining Text Format when using a Formula

    Sorry to bear bad news. I started to look at this and realized that this cannot be done, not even with a macro. You cannot format individual characters that are the result of a formula.

+ 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. Concatenating numbers as text and retaining text format
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-19-2014, 10:14 PM
  2. Retaining formula result when exporting WS to Text files
    By troth in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2011, 05:35 AM
  3. Retaining number format
    By PooH in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-08-2010, 10:03 AM
  4. Retaining number format in a text string
    By bngms in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-27-2007, 11:31 AM
  5. Retaining Arrow Format
    By surfengine in forum Excel General
    Replies: 2
    Last Post: 08-15-2007, 07:19 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