+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting to format cells to Percentage

  1. #1
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Conditional Formatting to format cells to Percentage

    I like to format cells to Percentage if
    cell J2 is %

    Please correct me, I tried conditional formatting
    =$J2=%
    Last edited by mikehk; 03-14-2019 at 12:05 AM.

  2. #2
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Using Conditional Formatting to format cells

    Got it...it should be
    =$J2="%"


  3. #3
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Using Conditional Formatting to format cells

    since the cells are formatted to Percentage, numbers
    get displayed as 0.90% ...how to remove % symbol

  4. #4
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Conditional Formatting to format cells to Percentage

    or since my numbers are 0.001, can CF do
    IF($J2="%"), $G2:$I2*100

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,543

    Re: Conditional Formatting to format cells to Percentage

    It would possibly help if you could upload a file and show us what you have then manually show us what you want.
    To upload a sample workbook (not a picture or pasted copy) click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Conditional Formatting to format cells to Percentage

    A bit of information while waiting for you to upload your file as recommended by JetMc:

    Relative to post #4, your CF formula will not work. A CF formula needs to evaluate to either TRUE or FALSE. If TRUE then the specified cell formatting will be applied. CF can't change the value of a cell.

    It is possible via formula to determine whether a cell is formatted as a percentage. The following CF formula evaluates to TRUE if J2 is formatted as a percentage:
    =LEFT(CELL("format", J2), 1)="P"
    Note that there is a slight anomaly in that changing the format of J2 does not precipitate a recalculation.

    Your post #1 request seems to be satisfied if you apply the above CF formula to cells G2:I2 and apply as part of the CF the number format "Percentage". Then if you change the format of J2 to or from "percentage" this will also change the formatting of G2:I2 (as noted above you will need to press F9 or do something else to cause a recalculation)

    In post #3 you want to remove the "%" from a cell formatted as a percentage. As far as I know you can't do that and it would be terribly confusing - how would you tell the difference between a number value and a percentage??

    The attached workbook implements the CF discussed above.

    Hope this helps a bit.
    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. [SOLVED] Conditional Formatting to format cells
    By mikehk in forum Excel General
    Replies: 7
    Last Post: 09-26-2018, 02:28 AM
  2. Replies: 4
    Last Post: 02-11-2017, 02:15 AM
  3. Replies: 4
    Last Post: 09-04-2016, 10:02 AM
  4. Replies: 1
    Last Post: 08-19-2016, 03:57 PM
  5. Conditional formatting use a formula to determine which cells to format
    By aaslezak in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-02-2015, 05:00 PM
  6. Replies: 2
    Last Post: 12-05-2014, 07:15 AM
  7. Replies: 7
    Last Post: 02-20-2013, 06:34 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