+ Reply to Thread
Results 1 to 7 of 7

Color range if sum equal to specifc value

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Color range if sum equal to specifc value

    Hello everybody
    I have numbers in range("A2:A" & lastrow)
    In D3 I have a number which is considered the sum of some values in range("A2:A" & lastrow)

    Here's an attachment to illustarte the expected results
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Color range if sum equal to specifc value

    Here, try this:

    Please Login or Register  to view this content.
    Use function as:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Where first range (A1:A100) is SUM range and second cell (A10) is criteria for color you want to sum.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Color range if sum equal to specifc value

    Not sure exactly what you are trying to achieve.

    In col. A, have you colored the range A7:A14 because the Sum(A7:A14) is equal to D3 i.e. 42?
    If yes, then why not A4:A13 because sum of this range is also equal to 42?

    You may try this to see if this is what you are trying to achieve.
    Please Login or Register  to view this content.
    Last edited by sktneer; 05-05-2015 at 06:55 AM. Reason: Correction in variable type.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Color range if sum equal to specifc value

    Mr. zbor
    Thanks for this nice and useful function .. but it is not required here

    Mr. sktneer
    Great solution and very good ..
    I wondered is there a way to extract the different possibilties to adjacent columns ..

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Color range if sum equal to specifc value

    To extract the possible sum ranges in adjacent columns, you may try this.....
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Color range if sum equal to specifc value

    Mr. sktneer
    This is the most perfect solution for my request
    Thanks alot for this great help

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Color range if sum equal to specifc value

    You're welcome Yasser!
    Glad I could help and thanks for the feedback as well.

+ 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: 3
    Last Post: 03-26-2013, 06:06 PM
  2. Replies: 3
    Last Post: 12-18-2012, 07:19 PM
  3. Replies: 3
    Last Post: 12-12-2012, 12:30 PM
  4. Set Bkg Color if cell value is less than or equal to -14
    By moglione1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2006, 06:55 PM
  5. ???Refer to a specifc cell in a named range
    By Jaylin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-10-2006, 07:50 AM

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