Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2014, 06:57 AM
zizao zizao is offline Painting cells whose sum is zero Windows Vista Painting cells whose sum is zero Office 2007
Novice
Painting cells whose sum is zero
 
Join Date: Mar 2014
Posts: 4
zizao is on a distinguished road
Default Painting cells whose sum is zero

I'm from Brazil and I need your help to solve a spreadsheet.



I have the following values:



8881.92
-6,735.58
-196546.73
-10,229.00
-6,003.60
-69.60
211,632.56
-2,878.32
-4,856.83
-137.24
-8,031.08



I need to paint the cells whose sum is zero.

Note that 8881.92 + - 6003.60 + - 2878.32 = zero
and - 196,546.73 + 211,632.56 + - 10,229.00 + - 4856.83 = zero


So I need formula or macro to paint those cells whose sum is zero, so:



8881.92
-6,735.58
-196546.73
-10,229.00
-6,003.60

-69.60
211,632.56
-2,878.32
-4,856.83

-137.24
-8,031.08



Spreadsheet with real data: download


Thanks in advance.

Last edited by zizao; 03-07-2014 at 05:15 AM.
Reply With Quote
  #2  
Old 03-07-2014, 02:17 AM
macropod's Avatar
macropod macropod is online now Painting cells whose sum is zero Windows 7 32bit Painting cells whose sum is zero Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Calculating the values from series that sum to a given value is difficult enough, with the resources to calculate expanding exponentially as the number of terms increases. Obviously, when you have multiple possible number series that can add to that number, the calculation load also increases. But, here's the problem with what you want: What are you going to do about the fact that some of the same values can be part of two or more solutions? For example, you say:
Quote:
Note that 8881.92 + - 6003.60 + - 2878.32 = zero
and - 196,546.73 + 211,632.56 + - 10,229.00 + - 4856.83 = zero
but so does:
Quote:
+ 8881.92 + - 196,546.73 + - 10,229.00 + - 6003.60 + 211,632.56 + - 2878.32 + - 4856.83 = zero
Clearly, if there's more than one solution, every solution you find can also be part of another solution.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-07-2014, 05:25 AM
zizao zizao is offline Painting cells whose sum is zero Windows Vista Painting cells whose sum is zero Office 2007
Novice
Painting cells whose sum is zero
 
Join Date: Mar 2014
Posts: 4
zizao is on a distinguished road
Default

Kaper found the solution in EXCELFORUM. The solution is attached to this message.
Attached Files
File Type: xlsm Pintar1.xlsm (24.4 KB, 10 views)
Reply With Quote
Reply

Tags
paint

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Painting cells whose sum is zero Sum up cells beginner Excel 2 12-03-2013 03:07 PM
In Excel 2007-After Selecting Visibe Cells-How do I "Copy to Visible cells" Only mag Excel 0 10-28-2012 08:04 PM
Painting cells whose sum is zero Un even cells lostsoul62 Excel 5 10-17-2012 08:33 AM
Painting cells whose sum is zero How-TO format cells (FILL) by comparing cells zanat0s Excel 1 07-03-2012 04:27 AM
Count range cells eliminating merge cells danbenedek Excel 0 06-15-2010 12:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft