+ Reply to Thread
Results 1 to 5 of 5

Custom (not conditional) Format Cell Based on Text

  1. #1
    Forum Contributor
    Join Date
    05-29-2017
    Location
    UK
    MS-Off Ver
    Pro Plus 2016
    Posts
    301

    Custom (not conditional) Format Cell Based on Text

    Hi guys, I just found out that it's possible somehow to colour a cell based on text value but WITHOUT using Conditional Formating (as this can slow down a file)

    Do you know what custom formating code we would use to say:

    IF cell value = "y" then cell colour is green
    IF cell value = "n" then cell colour is red


    Nothing comes up on Google on this one...

    Thanking you in advance!

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Custom (not conditional) Format Cell Based on Text

    Not possible with text, but possible with number.

    [Green]\y;;[Red]\n

    Key in 1 for y and 0 for n

  3. #3
    Forum Contributor
    Join Date
    05-29-2017
    Location
    UK
    MS-Off Ver
    Pro Plus 2016
    Posts
    301

    Re: Custom (not conditional) Format Cell Based on Text

    Ah... so it would not work in my case then... got to be text... But thank you so much anyway, Bo_Ry!! Greatly appreciate

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

    Re: Custom (not conditional) Format Cell Based on Text

    You can use custom formatting to colour the TEXT/NUMBER of a cell, but only by testing the numeric value. The only way Conditional Formatting can slow your file down is if you are applying the formats to tens of thousands of cells (or worse, to millions of cells, as I've seen people do sometimes). As for nothing coming up on Google .. you didn't do a good job on searching: https://exceljet.net/custom-number-formats

  5. #5
    Forum Contributor
    Join Date
    05-29-2017
    Location
    UK
    MS-Off Ver
    Pro Plus 2016
    Posts
    301

    Re: Custom (not conditional) Format Cell Based on Text

    Thanks, Glenn. I did do a good job researching, what I didn't know was "but only by testing the numeric value" and hence, that's why could not find anything. The lik you shared does not answer the original question posted!

+ 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 format based on certain text in adjacent cell
    By aswad12345 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2019, 02:51 PM
  2. conditional format based on adjacent cell's text
    By doughigh in forum Excel General
    Replies: 2
    Last Post: 03-15-2017, 08:31 AM
  3. Replies: 4
    Last Post: 11-11-2015, 12:05 PM
  4. Conditional Format to Add List of Text Based Upon Cell Contents
    By mkedyr1969 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2015, 11:58 AM
  5. Replies: 1
    Last Post: 09-18-2013, 02:54 AM
  6. Replies: 2
    Last Post: 07-28-2013, 03:28 PM
  7. Conditional Date Formatting with a Custom Cell Format
    By kqueen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-28-2012, 01:48 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