+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting where formula is included

  1. #1
    Registered User
    Join Date
    08-17-2018
    Location
    UK
    MS-Off Ver
    2013
    Posts
    8

    Conditional Formatting where formula is included

    On Sheet 1, cell D5 contains ='Pg1!C3 - this is pulling a value of 3 from a second worksheet, Pg1

    I tried to set up conditional formatting on D5 (Sheet 1) based on the Rule Type - "Format only cells that contain"' a cell value of 3, (Cell Value = 3 and setting a colour of Orange), but that does not work.

    Can you advise (hopefully without a macro) if there is a way for conditional formatting to work in this instance?

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Conditional Formatting where formula is included

    it should work, MY thoughts are is the value in the background sheet text?, or formatted to be 3 and is actually 3.1 or 2.9?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    08-17-2018
    Location
    UK
    MS-Off Ver
    2013
    Posts
    8

    Re: Conditional Formatting where formula is included

    Hopefully that has uploaded a file entitled, "Test"
    Attached Files Attached Files

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

    Re: Conditional Formatting where formula is included

    Value from 'Pg1!C3 is Text so in CF you need to change to ="2"

    Or change C3 formula to
    =IF(AND(H35>=0, H35<=25), 1, IF(AND(H35>=26, H35<=49), 2, IF(AND(H35>=50, H35<=74), 3, IF(AND(H35>=75, H35<=100), 4, ""))))

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional Formatting where formula is included

    Numbers should not be surrounded by quotes. That makes them into text values as mentioned in post #4.

    I recommend removing all quotes (that surround numbers) from formulas and Conditional Formatting.

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Conditional Formatting where formula is included

    On the original post i asked you if the values were text. they are so text <> a number so no format

    =IF(AND(H35>=0, H35<=25), "1", IF(AND(H35>=26, H35<=49), "2", IF(AND(H35>=50, H35<=74), "3", IF(AND(H35>=75, H35<=100), "4", ""))))

    you can see the formula returns a value as text, if you return it as a number
    =IF(AND(H35>=0, H35<=25), 1, IF(AND(H35>=26, H35<=49), 2, IF(AND(H35>=50, H35<=74), 3, IF(AND(H35>=75, H35<=100), 4, ""))))

    or you change the contitional format to deal with text

+ 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. Replies: 8
    Last Post: 08-03-2016, 06:18 PM
  2. Replies: 7
    Last Post: 02-03-2013, 10:01 AM
  3. Conditional formatting (In a macro included file)
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-24-2012, 03:44 PM
  4. Replies: 1
    Last Post: 12-11-2011, 04:21 PM
  5. Conditional Format with ISNA included
    By Justinmih in forum Excel General
    Replies: 4
    Last Post: 09-30-2011, 05:41 PM
  6. Setting one cell = to another, formatting included.
    By manxman in forum Excel General
    Replies: 1
    Last Post: 05-06-2006, 07:11 AM
  7. Can Excel cell formatting be included in an IF statement?
    By neeses in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2005, 03:05 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