+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting, based ot multiple values in 2 cells.

  1. #1
    Registered User
    Join Date
    12-03-2014
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2013
    Posts
    3

    Conditional formatting, based ot multiple values in 2 cells.

    Hello,

    I am stuck with the following issue:

    I need to create the following formatting:

    if in cell A1 one of the values A, B or C is present and in cell B1 one of the values 21, 22, 23, 24 or 25 is present, paint cell B1 in red.
    The values are examples, but if I have to set a separate rule for every pair of the data range I have in these cells, I have to create more than 100 separate rules.

    The single rule for every pair I have used before is =(A1="A")*(B1=1)=1 and so on. But this was when I had to compare single value in cell A1 with several values in cell B1.

    Thank you in advance for the help.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional formatting, based ot multiple values in 2 cells.

    Perhaps something like:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-03-2014
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2013
    Posts
    3

    Re: Conditional formatting, based ot multiple values in 2 cells.

    Tried that - not working

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional formatting, based ot multiple values in 2 cells.

    Could you explain what you mean exactly by "not working"?
    From your description of the problem in your original post, that solution works perfectly for me.

    Perhaps if you post a sample workbook it would be easier to help you out.

    BSB.

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Conditional formatting, based ot multiple values in 2 cells.

    Solution looks fine and works for me too.
    Check your data, maybe A1 is "A<space>" or something
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  6. #6
    Registered User
    Join Date
    12-03-2014
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2013
    Posts
    3

    Re: Conditional formatting, based ot multiple values in 2 cells.

    I gave 21-25 as an example for the second cell values. The actual numbers are not subsequent. The values in the 1st cell are of the type N1, N17, N3 or just numbers. Same goes for the second cell. I apologise if I have misled you - I just used example values.

    =AND(OR(A1="N3",A1="N14",A1="N17"),AND(B1=21,B1=2,B1=3,B1=4,B1=5,B1=11,B1=12,B1=17,B1=18,B1=19,B1="N1",B1="N9",B1="N11",B1="12",B1="13"))

    This is one of the formulas I need with the correct values. The error message is "Incorrect formula"

+ 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: 07-25-2014, 05:17 AM
  2. Conditional Formatting Based on Multiple Text Values
    By Butman in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-19-2014, 11:57 PM
  3. [SOLVED] Conditional Formatting based on multiple values in table
    By jcox1953 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-09-2014, 07:30 PM
  4. [SOLVED] Conditional Formatting - Coloring Cells based on Values
    By desibabuji in forum Excel General
    Replies: 8
    Last Post: 11-22-2013, 12:31 PM
  5. Replies: 2
    Last Post: 08-27-2011, 03:05 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