+ Reply to Thread
Results 1 to 2 of 2

Combining formulas

  1. #1
    Registered User
    Join Date
    04-27-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Combining formulas

    Hello,

    I currently have two formulas/rules conditionally formatting a range of cells.
    They are (in order of application):
    =AND(A2="",G2="") - This is set to format the cell in white (i.e. as if it had not been formatted)
    =ISERROR(MATCH(G2,$H$31:$H$54,0)) - This formats the cell in red so that it is highlighted.

    The purpose of this is to show me cases where G2 does not match a predefined list of values (H31:H54), but not highlight cases where G2 is blank, as long as A2 is blank also.
    This works fine (although if G2 is filled correctly, and A2 is blank, it doesn't highlight, which confuses me, but doesn't matter to the functionality of my spreadsheet).

    What I would like is to combine the two formulas together into one single rule.

    I have tried
    =OR(ISERROR(MATCH(G2,$H$31:$H$54,0)),NOT(AND(A2="",G2="")))

    and several variations of this, but cannot get it to work.

    Does anyone have any ideas?

    Thanks very much,
    Jess

    P.S. If someone could also explain to me why =AND(A2="",G2="") works if A2 is filled and G2 is blank, but not the other way round, I'd be very interested!

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Combining formulas

    If G2 is blank surely will get the ISERROR condition? so the test for G2=="" is redundant.

    Assuming the above, what should A2 be?

    =AND(ISERROR(MATCH(G2,$H$31:$H$54,0)),A2<>"")

    If G2 is blank (error) AND A2<>""

+ 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. Combining 3 formulas
    By lostweasel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2015, 10:36 AM
  2. Combining IF AND formulas
    By hzarry in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-07-2015, 05:26 AM
  3. Combining formulas
    By wjk221 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2014, 01:17 PM
  4. [SOLVED] combining formulas
    By bubs in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-23-2013, 06:14 AM
  5. [SOLVED] Need Help With Combining Two Formulas
    By jhudson444 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-07-2013, 10:44 AM
  6. [SOLVED] Combining IF formulas
    By nav505 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2013, 01:24 PM
  7. combining formulas
    By ericc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-24-2010, 08:26 PM

Tags for this Thread

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