+ Reply to Thread
Results 1 to 8 of 8

Conditional formatting to highlight cells with formulas (vs. constants)

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

    Conditional formatting to highlight cells with formulas (vs. constants)

    Is it possible to use conditional formatting to highlight cells that use formulas, as opposed to having constants?

    I have a sheet that uses formulas to provide a default value, but you can type in a number if you want to replace the default. I want to be able to easily identify which ones use the default formula.

    If I use functions like FIND, they look at the result of a formula, and not the formula itself.

    I know I can write a UDF that will figure it out but I was wondering if there is some built-in way.
    Last edited by 6StringJazzer; 11-25-2010 at 10:30 AM.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Conditional formatting to highlight cells with formulas (vs. constants)

    Hi,

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581

    Re: Conditional formatting to highlight cells with formulas (vs. constants)

    Hi,

    If you highlight the section of the spreadsheet you want to look at, then hit the following keystrokes, it will highlight only the cells with formulas.
    CTRL+G, ALT-S, F
    (You can select whether you want Numbers, Text, Logicals, or Errors)
    If you want to highlight cells with constant values, you can hit:
    CTRL+G, ALT-S, O
    (Again, you can select whether you want Numbers, Text, Logicals, or Errors)

    As to where the Go To thing is in the menu paths, I haven't a clue... so the keystrokes are all I can give you.

    Hope that helps.
    S

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Conditional formatting to highlight cells with formulas (vs. constants)

    Hi,

    You can do this with XLM to avoid code

    Create a named range called IsFormula that refers to

    Please Login or Register  to view this content.



    Use the formula

    Please Login or Register  to view this content.
    to activate your conditional formatting
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

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

    Re: Conditional formatting to highlight cells with formulas (vs. constants)

    Thanks sweep, that's exactly what I was hoping for. I had to look that one up--I'm completely unfamiliar with Excel 4 macros.

  6. #6
    Registered User
    Join Date
    04-04-2013
    Location
    Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Conditional formatting to highlight cells with formulas (vs. constants)

    Can this be reversed so it highlights cells that do not have formulas? I want to see where users of a template have overriden a cell with a value.

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

    Re: Conditional formatting to highlight cells with formulas (vs. constants)

    Welcome to the Forum DeRo22!

    Normally the moderators frown on asking a new question in an old thread. In this case I'll answer it because your question is SO closely related to the original question, which I asked myself.

    Use the technique shown by sweep (if you want to avoid VBA) or ConneXionLost (if you don't mind VBA). Then for the condition use

    =NOT(IsFormula)

    However, this will also highlight blank cells in the affected range so make sure you set the correct range for your conditional formatting to include only those cells that you put formulas in.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Conditional formatting to highlight cells with formulas (vs. constants)

    If you're using Excel 2007 or later and you choose to use the XL4 macro function GET.CELL(...) the file MUST be saved as a macro enabled file in the *.xlsm format.

    So, there's really no advantage in using the XL4 macro function to avoid using the VBA UDF. Both will require saving the file as a macro enabled file in the *.xlsm format.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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