decreasing from a stable Quantity Macro

shahsavand

Board Regular
Joined
Dec 8, 2014
Messages
74
i wanna decrease my stock with the last time i used my inventory.
for example ID no 1. my need is 200 and my stock is 5000 so my shortage is 5000-200=4800 then you can see we have this Id in another row in which my requirement is 54.here i wanna calculate it like this 4800-54=4746
(stock quantity is stable for each ID)
i need a macro for doing it.please somebody help me.

ProductIDNEEDSTOCKShortage
A12005000
4800
A22002000
A32512-13
A453631
A56254248
B642319
B7213615
B15450004946
B26200194
c656910031
c35412-42
c1426588-177
c26329967

<tbody>
</tbody>
 
You're welcome, I'm glad it helped (by the way I forgot to say the above formula should be confirmed with CTRL-SHIFT-ENTER rather than just ENTER as it is an array formula, but it seems like you already knew that).

Regarding learning Excel, I think a good way is just to look at posts here on the MrExcel forum. There are many very experienced users who post great solutions that you can learn from. You could also try posting solutions to other people's questions where possible, and that can be a good way of learning by doing.

There are a lot of other good resources too. Here is one list compiled by hiker95 that might be helpful:
http://www.mrexcel.com/forum/genera...917163-practical-excel-books.html#post4409672

I really like the ExcelIsFun Youtube videos as well:
http://www.youtube.com/user/ExcelIsFun
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,215,219
Messages
6,123,683
Members
449,116
Latest member
HypnoFant

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