+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting based on sum of values in multiple columns/rows

  1. #1
    Registered User
    Join Date
    06-05-2017
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    11

    Conditional Formatting based on sum of values in multiple columns/rows

    I have a spreadsheet that tracks resource allocation over each month. Each month is a new column and a single resource can appear on multiple rows (if they are split amongst workstreams).
    I have applied conditional formatting to highlight the resource allocation figures in red when a particular resource is overallocated.
    I would also like to apply this formatting to the resource name, however when I expand the conditional formatting range, the incorrect fields are highlighted.
    I am stuck at how to modify this rule to cater for this or create a new rule just for the names column.
    I appreciate and thank you for your assistance in advance.
    Please find a sample spreadsheet attached.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,578

    Re: Conditional Formatting based on sum of values in multiple columns/rows

    You may be able to get a more elegant solution using VBA, of which I know too little to help, however this is a way to accomplish the task using formulas.
    1. Produce a list of distinct names using: =IFERROR(INDEX(Table1[Name],MATCH(0,INDEX(COUNTIF(D$12:D12,Table1[Name]),,),)),"")
    2. Produce a matrix of names whose monthly sum is greater than one using: =IF(SUMIFS(Table1[Apr-22],Table1[[Name]:[Name]],$D32,Table1[[D/C]:[D/C]],"Capacity",Table1[[Resource Status]:[Resource Status]],"Active")>1,$D32,"")
    3. Use the following formula as a conditional formatting rule: =AND(F3="active",SUMPRODUCT(--(G$32:O$36=D3)))
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    06-05-2017
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    11

    Re: Conditional Formatting based on sum of values in multiple columns/rows

    Hi JeteMc,
    Thank you for your reply.
    Whilst the approach works, the name list is constantly changing so I need a method that I do not have to maintain. Perhaps VBA would provide a better solution, I will keep researching.
    In the meantime I will keep this thread as open should there be any other solutions out there.
    Regards

  4. #4
    Registered User
    Join Date
    06-05-2017
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    11

    Re: Conditional Formatting based on sum of values in multiple columns/rows

    I ended up using a slightly modified version of JeteMc's suggestion and utilising VBA to automatically apply it every time a row is modified in the source sheet (to cater for the constantly changing list).

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,578

    Re: Conditional Formatting based on sum of values in multiple columns/rows

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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: 6
    Last Post: 11-20-2018, 05:38 PM
  2. [SOLVED] Conditional formatting based on rows AND columns
    By HelenaF in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-04-2018, 03:52 AM
  3. [SOLVED] Conditional Formatting looking over multiple rows and columns
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-30-2015, 11:21 AM
  4. [SOLVED] Conditional Formatting: Duplicate rows based on multiple columns.
    By Old4xford in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-08-2014, 11:25 AM
  5. [SOLVED] Conditional Formatting based on values in two columns
    By lukestkd in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-29-2013, 06:50 AM
  6. Conditional Formatting - Multiple Rows and Columns
    By mltucc in forum Excel General
    Replies: 2
    Last Post: 04-20-2012, 10:30 PM
  7. concatenate rows with columns based on conditional formatting in VBA?
    By bandit_kaine in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2010, 03:16 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