hi! i have a list of amounts on column A, and i have a total on column B, i am trying to create a program that sum the values on column A until ithe sum is equal to the amount on column b, any clue, i am really without clue about this!!
Welcome:
You could add conditional formatting to highlight the last cell that is less than or equal to column B:
Click on cell A1
From the format menu, choose conditional formatting.
Choose "formula is" and type in the following:
=SUM($A$1:$A1)<=$B$1
Choose a format
This will highlight those cells that add up to less than the value in cell B1.
but i cannot make it work, i meant it work but dont show anything just the time that it took can someone help me in this, because this exactly waht i am trying to do, thanks
the first x values in column A that together sum the value in column B
(that is what your first post says)
or:
all combinations that together sum the value in column B.
Then my question is: where do you want to put this lists? This decides mainly if you want to use macro or not.
I never tried combinations but this should not be too hard if you understand a bit of VBA.
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.