The same logic can be used during the pandemic period, to allocate critical resources.
Calculated remaining stock, when there is more stock than demand, allocate the demand according to the priority. When there is still stock, but less than demand, allocate to the rest of stock.
When there is no stock, allocate 0..
Hi! I'm also here to share my solution.
I did not use the macro approach though. I'm using the Multi-Row Tool to be able to get the same output and also because I don't know how to use the macros yet.
I began solving this Challenge after I solved Challenge 15 (because 15 is for Beginner level that's why I solved it first). Anyways, I was curious and since the values are almost the same, the familiarity of processing the data made it easier to solve.