+ Reply to Thread
Results 1 to 8 of 8

Conditional Formatting on Fractions

  1. #1
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Conditional Formatting on Fractions

    Hi all,


    I am currently trying to use conditional formatting to highlight a cell in red where the numerator is smaller than the denominator.

    One thing to note is that the fractions in my original workbook are being populated using a formula, so the fraction itself isn't hard-coded into the cell, but rather is being generated via a vlookup/index-match formula that looks within sheets and returns that fraction (just mentioning that detail in case it might interfere with the conditional formatting).

    I've attached a workbook to hopefully better illustrate the solution I'm trying to get to.

    Darko
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Conditional Formatting on Fractions

    You're gonna have to play round with this by replacing parts of the formula with whatever your formula actually is
    But given 91/247 as text

    =LEFT(B18,FIND("/",B18)-1)/MID(B18,FIND("/",B18)+1,10)
    produces a decimal.

    So just check for it being greater than 1 so
    =(LEFT(B18,FIND("/",B18)-1)/MID(B18,FIND("/",B18)+1,10))>1
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,507

    Re: Conditional Formatting on Fractions

    Not looked at your workbook ( on iPad). But, if the numerator is less than the denominator, the result will be less than one ( 1 ). 3/4, 7/8, 9/16, whatever. So, just check if it's less than one ... I think.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Conditional Formatting on Fractions

    Quote Originally Posted by TMS View Post
    Not looked at your workbook ( on iPad). But, if the numerator is less than the denominator, the result will be less than one ( 1 ). 3/4, 7/8, 9/16, whatever. So, just check if it's less than one ... I think.
    His 3/4, 7/8 etc is text

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,507

    Re: Conditional Formatting on Fractions

    Ah, OK. So, then
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    to highlight entries where the fraction is less than one.

  6. #6
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Re: Conditional Formatting on Fractions

    Thanks! Worked like a charm

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,507

    Re: Conditional Formatting on Fractions

    You're welcome. Thanks for the rep.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,507

    Re: Conditional Formatting on Fractions

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Formatting Fractions
    By linasod in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2017, 10:21 AM
  2. Conditional Formatting Fractions of Equal Value
    By ThanksAlot in forum Excel General
    Replies: 6
    Last Post: 06-16-2016, 02:31 PM
  3. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  4. Formatting "Inch" Fractions?
    By Michael D in forum Excel General
    Replies: 2
    Last Post: 01-30-2013, 06:45 PM
  5. Formatting cells as fractions
    By windunce in forum Excel General
    Replies: 4
    Last Post: 11-08-2008, 09:50 PM
  6. excel conditional formating decimal fractions
    By Andy Dixon in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-17-2006, 05:30 PM
  7. Converting Decimal Fractions to Fractions of a Specified Number
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-29-2005, 11:09 AM

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