Forum Discussion
SUM TO ZERO
Dear Users,
I have over 6000 data and i want to Match all amount that sums to zero or a set value without the try and error method which takes time and prone to errors, please how can i achieve that using excel or Macros.
thanks.
11 Replies
- Riny_van_EekelenPlatinum Contributor
IDRIS_A Similar to mtarler's solution and with the same end-result (I believe), something I picked-up a while ago from https://www.myonlinetraininghub.com/excel-bank-reconciliation-formula
I've taken the liberty to apply this trick to your data set, using a few helper columns and an intermediate pivot table. It highlights all numbers that cancel each other out. Whether these cancelling numbers really are related is something for you to determine.
- IDRIS_ACopper Contributor
thank you very much. Riny_van_Eekelen , suppose i have a distinguish matching details just like @mtarler' have helped asked, how should i go about it? thanks for your contributions.
- Riny_van_EekelenPlatinum Contributor
IDRIS_A Add another helper column adding the attribute/description that pairs matching opposites. Build the pivot table using the 2nd helper column and refresh. Made up some attributes to test it. See attached.
- Rajesh_SinhaIron ContributorIn attached Sheet Column A has few values are Negative and few are positive,,, and if you are thinking to use SUM,,, then you are not supposed to get ZERO,,, please edit your post and be clear and loud, or show us the expected results in attached sheet,,, honesty I'm clueless !!
- mathetesGold Contributor
What you're asking is not exactly clear, I'm sorry to say. Nevertheless, if what you mean by "Match" is to identify, then you could use the Filter capability. That's available under the Data...toolbar. Or, if you have the newest versions of Excel, there's a FILTER function that could list every row of a database where zero is identified in some field.
You would be far more likely to get a more detailed and helpful response if you could post your actual spreadsheet (just making sure it contains no confidential information). A simple verbal description is almost always too confusing or unclear.
- IDRIS_ACopper Contributor
mathetes Thanks for your response. yes it is to identify, attached shows a random sample which i am sure sum of the highlighted is equal to zero (which is what i want to achieve).
suppose i have 6000 or more cells cells to identify . how best can i go about it. i hope this clarify my questions.
- mathetesGold Contributor
You're correct that the highlighted cells do sum to zero.
That raises at least a number of questions:
- How did you identify them? (Or was this just a made-up set where you simply changed the signs?)
- Presumably every number in those highlighted ranges (or the vast majority of them) has a matching number:
- do you want therefore to identify
- every pair that sums to zero,
- every set of four that sums to zero,
- every set of six that sums to zero,
- etc
- Or just the largest set (as you have in your sample)
- ?
- do you want therefore to identify
You need to become a lot clearer.....
and maybe you could describe the context you're working in here as well, so long as it's not confidential. Maybe there's a different way to meet the objective.