+ Reply to Thread
Results 1 to 13 of 13

SUMIFs Code

  1. #1
    Registered User
    Join Date
    04-21-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    7

    SUMIFs Code

    Hi Everyone,

    can i change the colour of the cell calculated using SUMIFs?

    Thanks in advance

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: SUMIFs Code

    Short answer...nope.

    Longer answer...you can use conditional formatting to format based on the result of your SUMIFS function.

    If you need more info, then you will need to provide me with more info, such as a sample workbook and a description of what you are trying to achieve.

    I hope this helps

  3. #3
    Registered User
    Join Date
    04-21-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Red face Re: SUMIFs Code

    Hi ajryan88,

    Thanks for the reply. I've attached the sample worksheet.
    Notice the code and what I'm trying to achieve is to calculate the sum of plate 1 and 2 and colour the cells that been calculated so that i know which cells are being calculated for plate 1 and 2. the main reason is to double check to avoid any missing data.

    Hope you can help me with this. Thanks in advance.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: SUMIFs Code

    Hmmm,

    This isn't quite what I imagined when you said SUMIFS. Why aren't you doing this on the worksheet as an Excel function?

    And are you saying you want the cells coloured once they have been included in the sum? Because if so, then this is not possible sorry. Unless you want to use an iterative loop in VBA instead of the SUMIFS, then it can be done, but it is a longer process than a simple SUMIFS.

    I hope this helps

  5. #5
    Registered User
    Join Date
    04-21-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: SUMIFs Code

    Hi ajryan88,

    I've attached revised sheet using excel formula. Please take a look at sheet 2. Is it possible with this? Or do you have any suggestion?
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: SUMIFs Code

    There is no Sheet2...

  7. #7
    Registered User
    Join Date
    04-21-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: SUMIFs Code

    Sorry, my mistake.

    Attached new one.
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: SUMIFs Code

    Hi,

    That is the right formula, however I'm still not sure what criteria you want the cells coloured from...?

  9. #9
    Registered User
    Join Date
    04-21-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: SUMIFs Code

    i want to highlight the sum cells if possible.

    thanks in advance.

  10. #10
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: SUMIFs Code

    Something like this?
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-21-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: SUMIFs Code

    hi,

    yes, something like that.
    would you mind explain to me the rule you use to format it?

  12. #12
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: SUMIFs Code

    Basically, the rule states that if Column C says "PLANT1" or "PLANT2" (as in your SUMIFS formula), then colour the corresponding sum cell yellow or green (depending on whether it says "PLANT1" or "PLANT2").

    I hope this helps

    If this solves your problem, please don't forget to mark this thread as solved (Thread Tools --> Mark As Solved), and please click on the * next to my post to say thanks

  13. #13
    Registered User
    Join Date
    04-21-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: SUMIFs Code

    HI ajryan88,

    Thanks a lot for the explaination of the code. Appreciate your help very much!!!
    Have a good 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. Countifs and Sumifs VBA code with criterias between 2 date range
    By Jul Stev in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-05-2013, 07:08 AM
  2. SUMIFS Puzzle - Trying to avoid adding multiple SUMIFS to get valid result
    By haldavid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-09-2013, 03:42 PM
  3. [SOLVED] Code optimization - WorksheetFunction.SumIfs() function
    By nfuids in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-11-2012, 10:50 AM
  4. [SOLVED] Sumifs, problem with the formula: =sumifs(c10:c200,<=today(),0)
    By Faustocruz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2012, 04:26 AM
  5. SUMIFS,INDEX,MATCH code problems
    By sofib09 in forum Excel General
    Replies: 10
    Last Post: 01-07-2011, 04:37 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