+ Reply to Thread
Results 1 to 4 of 4

Choose the type of conditional formatting

  1. #1
    Registered User
    Join Date
    01-13-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    76

    Choose the type of conditional formatting

    Hello everyone,

    I am using conditional formatting.
    So I have a set of data, which range from 0 to 100 at cells A1:A50
    I might need to highlight the values in between 2 figures or the highlight the values which is higher than a figure that I specified.
    Is there a way to use conditional formatting such as:
    (a) If B1 and C1 have figures (meaning B1 and C1 != ""), highlight all the values in between.
    (b) If either B1 or C1 is inputed (meaning there is one cell is leave blank), highlight all the values which is smaller than the figure.

    Thank you very much.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Choose the type of conditional formatting

    What do you mean by this
    (a) If B1 and C1 have figures (meaning B1 and C1 != ""), highlight all the values in between.
    Also,
    (b) If either B1 or C1 is inputed (meaning there is one cell is leave blank), highlight all the values which is smaller than the figure.
    Highlight all values in the entire column A?

    Will values be entered only in B1 & C1?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Choose the type of conditional formatting

    Select the cells in the range A1:A50 and then click on Conditional Formatting | New Rule | Use a Formula ..., then put these formulae in:

    =AND($B$1<>"",$C$1<>"",AND(A1>$B$1,A1<$C$1))

    for condition (a) and this one for condition (b):

    =OR(AND($B$1<>"",A1<$B$1),AND($C$1<>"",A1<$C$1))

    For each one in turn, click the format button, then the Fill tab and choose your colour. OK your way out.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    01-13-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    76

    Re: Choose the type of conditional formatting

    thanks arlu and pete,

    pete suggestion solve my part of question. the real part of the question is how can i combine the condition (a) and condition (b) together become a single formula

    @arlu: 1. if a and b is given a value for example, 20 and 80, then highlight the cells (in column A) which has the value in between these 2 number.
    2. if only a or only b has value while the other left blank, then highlight the cells (in column A) which has the value lower than the number.
    3. A1:A50 is filled with random numbers, while B1 and C1 are value(not text).

+ 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