+ Reply to Thread
Results 1 to 10 of 10

Conditional formating with two references

  1. #1
    Registered User
    Join Date
    10-25-2013
    Location
    Croatia
    MS-Off Ver
    Excel 2010
    Posts
    17

    Question Conditional formating with two references

    I don't know if the title of thread is right but here is what I'm trying to do.

    I want Excel to bold any value in A1:A6 column that is lower than value in A1 cell, but if A1 cell is BLANK I would like Excel to automatically use value in cell A2 as measure/reference.

    How to do that? Is that even possible? I believe it is

    Thanks in advance.
    Last edited by lvl-48; 10-27-2013 at 09:09 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Conditional formating with two references

    1. highlight the range you want to apply the conditional formatting to (A1:A6)
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =A1<IF($A$1="",$A$2,$A$1) format fill as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Conditional formating with two references

    You can try this:

    1: Highlight cells A2:A6 and apply this CF formula:

    =OR(AND(A$1="",A1<A$2),A1<A$1)

    - Moo
    Last edited by Moo the Dog; 10-26-2013 at 05:45 PM.

  4. #4
    Registered User
    Join Date
    10-25-2013
    Location
    Croatia
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Conditional formating with two references

    Quote Originally Posted by FDibbins View Post
    FDibbins
    Quote Originally Posted by Moo the Dog View Post
    Moo the Dog
    In both cases I'm getting ''The formula you typed contains error'' message. hmmm?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Conditional formating with two references

    It worked fine when I tested it. Did you re-type it, or copy/paste?
    Check for a missing ) CF will tell you there is an error, but wont tell you what or where

  6. #6
    Registered User
    Join Date
    10-25-2013
    Location
    Croatia
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Conditional formating with two references

    I copy/pasted it...Maybe the problem is because of using MS Excel 2010 version?

    Here is the file:
    Book1.xlsx

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Conditional formating with two references

    Perhaps you should replace the commas with semicolons according to your regional settings?

  8. #8
    Registered User
    Join Date
    10-25-2013
    Location
    Croatia
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Conditional formating with two references

    Quote Originally Posted by Pepe Le Mokko View Post
    Perhaps you should replace the commas with semicolons according to your regional settings?
    Yep, that was the problem, thanks.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Conditional formating with two references

    Thanks for the assist Pepe

    And thanks for the feedback, lvl

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Conditional formating with two references

    Quote Originally Posted by lvl-48 View Post
    Yep, that was the problem, thanks.
    You're welcome. Indicating your location in your profile helped to find the answer. Some people indicate " Earth" as location or other funny things, which do not help us help them !

+ 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: 4
    Last Post: 01-23-2014, 10:14 AM
  2. Replies: 12
    Last Post: 12-04-2012, 10:11 AM
  3. Conditional formating that references another page.
    By wannabeexcelpro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-15-2007, 02:27 AM
  4. Replies: 6
    Last Post: 08-14-2006, 05:00 PM
  5. Replies: 2
    Last Post: 03-27-2006, 12:10 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