+ Reply to Thread
Results 1 to 4 of 4

Defined Name used in Formula within Conditional Formatting

  1. #1
    Registered User
    Join Date
    08-07-2013
    Location
    Texas
    MS-Off Ver
    Microsoft Office/Excel 2019 for Mac
    Posts
    39

    Defined Name used in Formula within Conditional Formatting

    Result I want - highlight any cell that has the matching text from a list on another sheet that has a defined name

    I have selected a group of cells on a worksheet and named this "AgedInv"
    In conditional formatting, I have placed this formula - =SUM(COUNTIF(A4,"*"&AgedInv&"*"))
    Then I choose to have the formatting result in red font for matching the text in the defined name list

    Either I haven't noticed this previously or something has changed, but all of a sudden there are inconsistencies in the data that is changed to red font. Some highlighted results are not on the Defined list and some on the defined list are not highlighted.

    I attached sample workbook. Does anyone have any ideas about what the issue is?
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Defined Name used in Formula within Conditional Formatting

    Hi Danielle,

    It looks like some of the stuff in your List Tab column A are numbers and not text. If you try to match those numbers to any text they won't agree. See the attached where I've added two columns to test column A. If that doesn't make sense then keep asking.

    Text vs Number Lookup.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,758

    Re: Defined Name used in Formula within Conditional Formatting

    You are applying the CF condition to the entire column but your formula references A4. That means that to format A1, it will check A4; to format A2, it will check A5, and so on. Change A4 to A1 and your formula works.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    08-07-2013
    Location
    Texas
    MS-Off Ver
    Microsoft Office/Excel 2019 for Mac
    Posts
    39

    Re: Defined Name used in Formula within Conditional Formatting

    6StringJazzer - that worked. Sometimes the simple issues are the hardest to pinpoint.

+ 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: 2
    Last Post: 12-28-2015, 10:08 PM
  2. Replies: 3
    Last Post: 06-19-2015, 07:16 AM
  3. 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
  4. Macro will not allow conditional formatting with a user-defined function
    By Med_MV in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2013, 05:28 PM
  5. Replies: 2
    Last Post: 08-30-2011, 02:17 PM
  6. Conditional Formatting based on Defined Names.
    By eyerukhi in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 06-19-2009, 11:08 AM
  7. Replies: 6
    Last Post: 03-12-2006, 06:30 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