+ Reply to Thread
Results 1 to 4 of 4

Different Formatting in Single Cell

  1. #1
    Registered User
    Join Date
    02-27-2020
    Location
    Wisconsin, USA
    MS-Off Ver
    MS Office Home & Student 2019
    Posts
    2

    Different Formatting in Single Cell

    I have a pretty complicated spreadsheet where one column has information in black font, another column has different information in red font, and a third column has information in blue font. My employer wants all sets of information in a single column combined with all three colors determining which is which.

    Column I shows areas that are out of compliance (in red)
    Column J shows areas with warnings (in black)
    Column K shows completed surveys (in blue and italics)

    Column G combines all of them as Column I, a semicolon in the middle, Column J, and then Column K on a new line.

    I am very new at VBA, but understand that I can achieve this using VBA. I'm not sure how, though. Any help is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-20-2007
    Location
    Felixstowe, England
    MS-Off Ver
    Excel 2013, 2019
    Posts
    217

    Re: Different Formatting in Single Cell

    Is this any use? The VBA macro replicates the logic of the formula, and formats the cell. See attached.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-27-2020
    Location
    Wisconsin, USA
    MS-Off Ver
    MS Office Home & Student 2019
    Posts
    2

    Re: Different Formatting in Single Cell

    GlennUK, thank you for your help!

    This does the trick; however, in all reality I have 450 stores on my list so when I click on the button to activate the macro, it takes several minutes to complete the task. Is there any way to speed this up? If not, is there a way to indicate the progress of macro running so the user at least knows it's working?
    Last edited by gogrw; 03-03-2020 at 04:41 PM.

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Different Formatting in Single Cell

    Hi,

    See the following code which uses the StatusBar at the bottom of the Spreadsheet (changes in red) in the modified copy of the attached File.
    Please Login or Register  to view this content.
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx

    Lewis
    Attached Files Attached Files

+ 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. Conditional Formatting in single cell
    By Martines91 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-18-2015, 09:05 AM
  2. [SOLVED] Single cell conditional formatting, different formatting at different times
    By namzed in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-18-2014, 07:02 PM
  3. [SOLVED] Conditional Formatting On Single Cell
    By tushdesai in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-17-2012, 06:59 AM
  4. Allow Formatting of a single Cell?
    By rekoj516 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2009, 10:04 AM
  5. Replies: 2
    Last Post: 11-02-2007, 12:03 PM
  6. Formatting a single cell
    By Dave in forum Excel General
    Replies: 8
    Last Post: 01-17-2006, 09:10 PM
  7. [SOLVED] xls worksheet formatting a single cell
    By Archer------------> in forum Excel General
    Replies: 1
    Last Post: 04-30-2005, 03:06 PM

Tags for this Thread

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