+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting based on 2 criteria

  1. #1
    Registered User
    Join Date
    01-12-2016
    Location
    Europe
    MS-Off Ver
    MS 2013
    Posts
    48

    Conditional formatting based on 2 criteria

    Hi

    I am looking for a way on how to highlight entire rows, based on 2 conditions:

    Condition 1) Each cell has to exactly sum to zero (with another cell in the same column, i.e. Column B), and:
    Condition 2) Have to be in the same group (in another column, i.e. Column A).

    Column A Column B
    Raw Data
    Group Balance
    Group 1 -500
    Group 1 500
    Group 2 -234
    Group 3 234
    Group 2 321
    Group 3 -234
    Group 2 100
    Group 4 -101
    Group 1 500

    Result
    Group Balance
    Group 1 -500
    Group 1 500
    Group 2 -234
    Group 3 234
    Group 2 321
    Group 3 -234
    Group 2 100
    Group 4 -101
    Group 1 500



    I have tried conditional formatting, but I have not being able to make it work, but I am sure one user could provide a suggestion. I also gladly welcome a VBA solution!

    Any help is very appreciated.

    /O
    Last edited by ugalskov; 07-06-2017 at 01:41 AM. Reason: Error in table (Group 2 -234 was mistakenly colored green)

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Conditional formatting based on 2 criteria

    ugalskov why is Group 2 -234 highlighted green? There are no Group 2 234.

    What am I missing?
    Dave

  3. #3
    Registered User
    Join Date
    01-12-2016
    Location
    Europe
    MS-Off Ver
    MS 2013
    Posts
    48

    Re: Conditional formatting based on 2 criteria

    FlameRetired, you're right. Group 2 -234 shouldnt be highlighted

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Conditional formatting based on 2 criteria

    bettor to attach a sample excel file and Group 1 sum also not equal to Zero
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Registered User
    Join Date
    01-12-2016
    Location
    Europe
    MS-Off Ver
    MS 2013
    Posts
    48

    Re: Conditional formatting based on 2 criteria

    The site won't allow me to attach the sample excel file.

+ 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. [SOLVED] Conditional formatting based on criteria
    By fscutaro in forum Excel General
    Replies: 7
    Last Post: 12-08-2015, 03:31 PM
  2. [SOLVED] Conditional Formatting - Based on Criteria
    By mlbdc2012 in forum Excel General
    Replies: 2
    Last Post: 02-03-2015, 05:50 PM
  3. [SOLVED] Conditional Formatting Based on Two Criteria (Using VBA)
    By macrorookie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2014, 07:19 PM
  4. [SOLVED] Conditional formatting based on two criteria
    By Brumbot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2013, 05:44 AM
  5. [SOLVED] Conditional Formatting based on 2 criteria
    By SantosJ in forum Excel General
    Replies: 2
    Last Post: 05-23-2012, 05:11 AM
  6. Using conditional formatting based on certain criteria
    By sophy_1402 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2011, 07:32 AM
  7. Conditional Formatting based on 2 Criteria
    By SteelDog in forum Excel General
    Replies: 3
    Last Post: 06-23-2008, 12:58 AM

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