Reverse SumIF: return column values based on sum criteria

mir994stan

New Member
Joined
Jul 18, 2021
Messages
42
Office Version
  1. 2016
Platform
  1. Windows
Greetings,
I don t know if i made good title, but i have no other idea how to call this question :) I tried search with some keywords, but with no luck. I was wondering if its possible to write a code to do reverse SumIF, to return all values from colum A whose sum is equal to value is some cell.
I have a table, (not pivot table) with 3 column A, B and C and x rows. In column A are serial numbers, column B have names, and column C have amounts for each serial in column A, all values are in ascending order. What im trying to achive is if i enter a name that exist in column B, in cell lets say L2, and in cell M2 i write a number for example 540. Macro should search for all names in column B and sum all values in column B until its that sum is matched with value from cell M2, and for those sum return all values from column A in order smalles to largest? I made example of how that should work ( i made it manually).
Thanks in advance. If its unclear what i would like to achive, feel free to comment. God bless you.
Capture.PNG
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top