+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting referencing a formula, but looking for text

  1. #1
    Forum Contributor
    Join Date
    10-13-2015
    Location
    Culloden, West Virginia
    MS-Off Ver
    2010
    Posts
    168

    Conditional Formatting referencing a formula, but looking for text

    Hi all,

    I've got a spreadsheet that I print every week that has the current week by date and day on it. When I open the spreadsheet it automatically updates the dates of the week to populate, starting with the Sunday of the current week. I have the date starting in Cell B4. Above it in Cell B3 I have the day of the week (Sunday, Monday,...) auto populating by referencing B4. I have it set up this way as sort of a check to make sure the dates are correct, the first day should always be Sunday.

    All of that works fine. The problem I'm having, I want the Cell that is supposed to say Sunday in B3 to turn Red if the date in B4 is incorrect (causing B3 to display something other than Sunday). I've tried several different ways with conditional formatting to no avail. I'm assuming it's because in my condition I'm stating "if B3 is not = to "Sunday" fill red. The problem is Sunday is a date format, and I'm telling it to look for the Text "Sunday".

    I'm not sure of the best way to solve this.

    Thanks in advance for any help.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Conditional Formatting referencing a formula, but looking for text

    Use this CF formula:

    =WEEKDAY(B4)<>1
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    10-13-2015
    Location
    Culloden, West Virginia
    MS-Off Ver
    2010
    Posts
    168

    Re: Conditional Formatting referencing a formula, but looking for text

    That formula works but doesn't accomplish what I'm shooting for. I want the cell to return the actual day of the week and if it does not say Sunday I want to use conditional formatting to turn the cell red. Using that formula still causes the cell to be in a date format when the conditional formatting is looking for Text (I think).

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Conditional Formatting referencing a formula, but looking for text

    No, leave your existing formula in B3, probably just =B4 and then formatted to use number format DDDD.

    Then use the formula I gave you as the Conditional Formatting (CF) formula you use on B3 to turn it red. (if needed)

  5. #5
    Forum Contributor
    Join Date
    10-13-2015
    Location
    Culloden, West Virginia
    MS-Off Ver
    2010
    Posts
    168

    Re: Conditional Formatting referencing a formula, but looking for text

    Perfect Sir. Sorry, I was a little slow on the uptake!

+ 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 Cells with Date or Text Values in a Conditional Formatting Formula
    By Phil Hageman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 09:36 AM
  2. Replies: 2
    Last Post: 03-09-2014, 05:22 PM
  3. Referencing conditional formatting in VBA
    By strud in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2013, 10:45 AM
  4. Replies: 10
    Last Post: 02-08-2013, 05:18 PM
  5. Replies: 3
    Last Post: 05-15-2012, 04:13 PM
  6. Conditional formatting with formula referencing range in different cell
    By pethaa1791 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-21-2008, 03:54 PM
  7. Replies: 0
    Last Post: 03-15-2005, 07:40 AM

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