+ Reply to Thread
Results 1 to 16 of 16

Conditional Formatting over multiple cells

Hybrid View

  1. #1
    Registered User
    Join Date
    09-25-2015
    Location
    Garrison Petawawa Ontario
    MS-Off Ver
    2010
    Posts
    8

    Conditional Formatting over multiple cells

    Hello everyone.

    I'm generating a user worksheet that must keep our users from exceeding certain values over multiple line items.

    Basically each item has a line, but multiple items can fall into the same "category" and when taken individually and or added together must not exceed a specific value.

    So if lines 1,2,5 and 9, all added together, and/or if one of the lines alone, exceed a specific value, the numbers all turn red to warn the user that they've exceeded their qty available.

    Any help would be greatly appreciated.
    Last edited by PetrockAmmoTech; 09-25-2015 at 09:13 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Conditional Formatting over multiple cells

    Use a formula to apply conditional formatting
    see for instance https://support.office.com/en-IE/art...b-f1951ff89d7f
    Best Regards,

    Kaper

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,605

    Re: Conditional Formatting over multiple cells

    Please post a sample sheet. Are there any negative values?

  4. #4
    Registered User
    Join Date
    09-25-2015
    Location
    Garrison Petawawa Ontario
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting over multiple cells

    I cannot post a sample of the sheet I'm working on as the information is controlled. There are no negative values. Lowest value being zero and the highest value may be veriable depending on category code.

    I'll do my best to fake a sheet.

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Conditional Formatting over multiple cells

    Indeed we do not want to see your delicate data. prepare a dummy file with few entries, and manually applied formatting. (short description why particular cell was/was not formatted in a comment or in next column could be helpfull).

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,605

    Re: Conditional Formatting over multiple cells

    If the suim of one row exceeds the limit, so will sthe sum of all rows
    So a condition like =sum(sum(a1:aa2),sum(a5:aa5),sum(a9:aa9))>your_limit as CF should do

    Your_limit cab be hard-coded or a cell ref if needed

  7. #7
    Registered User
    Join Date
    09-25-2015
    Location
    Garrison Petawawa Ontario
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting over multiple cells

    I'm very new to using excel in this advanced manner and have no training with the program other than what I've managed to figure out.

    I'll post the fake workbook that I've generated and I'll show what I'm trying to accomplish with statements in blue.

  8. #8
    Registered User
    Join Date
    09-25-2015
    Location
    Garrison Petawawa Ontario
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting over multiple cells

    Practice Book.xlsx

    I hope this works.

    I'm sorry I don't know more about the program, to make reaching a solution easier.

  9. #9
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Conditional Formatting over multiple cells

    Formula used to set the rule for conditional formatting (see in post #2 how to apply):
    Formula: copy to clipboard
    =SUMIF(A:A,A2,D:D)


    see in attached file "in action"
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-25-2015
    Location
    Garrison Petawawa Ontario
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting over multiple cells

    I don't know if I did something wrong, but I don't see any changed in the practice book. I tried changing the numbers, but nothing happened.

  11. #11
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Arrow Re: Conditional Formatting over multiple cells

    I have no idea what you did (or what you changed) and if you were trying my attachment.

    So please download (again ?)
    Kopia Practice Book.xlsx
    from post #8 and try such changes as marked on the picture below.

    For instance, start with changing D2 to 90. Current blue interios for all cells where column A is 0001 shall disappear.

    Then try other changes and see how blue appears in other cells.

    Have a good weekend,

    Kaper

  12. #12
    Registered User
    Join Date
    09-25-2015
    Location
    Garrison Petawawa Ontario
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting over multiple cells

    Ah I see! I still do not understand the formula and cannot successfully apply it too my sheet.

    One thing that I did not consider, the category code is different though the items are similar. When I amend our practice book, the formula doesn't work. I've changed this practice book to better reflect my actual spreadsheet.

    Is it possible that I may need to add a column and assign like items with a serial, like a number or letter? My serial column would be G and my item qty column is H.

    Thanks for your help, thus far.

    Kopia Practice Book 2.xlsx
    Last edited by PetrockAmmoTech; 09-29-2015 at 08:09 AM.

  13. #13
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Conditional Formatting over multiple cells

    So for cells D2,3 and 7 (you can select them with Ctrl pressed) conditional formatting rule based on formula:
    Formula: copy to clipboard
    =sum($D$2;$D$3;$D$7)>2000

    and for whole D2:Dx range formula
    Formula: copy to clipboard
    =D2>2000

    (or standard conditional formatting (not based on formula) just greater than)
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    09-25-2015
    Location
    Garrison Petawawa Ontario
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting over multiple cells

    I tried the formula =sum()>2000 but the cells did not change colour when data was inputed. I used the Cntl feature, as suggested.

    I've also notice that I'm using version 2003, not 2010.

    Here is my actual workbook with all of the sensitive info removed. As you can see, lines 3,5,10,13,14,20 and 35 are the same. The item identifying code is A in column G. The Qty would be in H. These lines, when added together can not exceed 2000.

    Maybe my actual work book will make a difference.

    Practice book 3.xls

  15. #15
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Conditional Formatting over multiple cells

    So we are going back to post #9 SUMIF does the work.

    Formula: copy to clipboard
    =SUMIF($G$3:$G$100,"A",$H$3:$H$100)>2000


    To not select only cells in column H rows 3,5,10,13,14,20 and 35 it can be added into the formula of conditional formatting (applicable to whole H3:H100 range).

    Formula: copy to clipboard
    =AND(SUMIF($G$3:$G$100,"A",$H$3:$H$100)>2000,$G3="A")
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    09-25-2015
    Location
    Garrison Petawawa Ontario
    MS-Off Ver
    2010
    Posts
    8

    Re: Conditional Formatting over multiple cells

    Well fellas, sorry for the delay in getting back to everyone.

    I've tried all the suggestions, and have been successful in getting individual cells to turn red when exceeding the value, but none of the other cells that should turn, will.

    Hopefully soon we'll get this sorted out.

+ 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 multiple cells based on multiple cells
    By jhuvba in forum Excel General
    Replies: 2
    Last Post: 05-18-2015, 12:19 PM
  2. Conditional Formatting Multiple Cells
    By imnotnotjoe in forum Excel General
    Replies: 1
    Last Post: 10-14-2013, 08:02 PM
  3. [SOLVED] Conditional Formatting based on multiple strings in multiple cells
    By lily_ruiz_06 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-27-2013, 04:23 PM
  4. Conditional formatting in multiple cells
    By EsKay! in forum Excel General
    Replies: 3
    Last Post: 07-02-2012, 10:02 PM
  5. conditional formatting for multiple cells
    By batjl9 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-07-2011, 01:13 PM
  6. Help with conditional formatting in multiple cells
    By Moebius8 in forum Excel General
    Replies: 2
    Last Post: 07-02-2008, 10:37 AM
  7. Conditional Formatting multiple cells
    By mwagon73 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-25-2008, 03:00 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