I am working on material requirement planning that is why I have to deal with invetory values. I have many products and they have specific stock values. Firstly I am looking at my current situation for the products. When I need a product I am looking at its stock value then I compare it with its delivery time. I have to know how long I can go with my stock value. SO at the below I am giving an exmp of one sheet of my project(delivery time and value sheet).
We will suppose that I am looking at AB2002 and its stock value is1300.
I want to create macro which is about to sum distance but this distance will up to me.
Exp:
A B C D E F
1 Product Aug.23 Aug.24 Aug.25 Aug.26 Aug.27
2 AB2001 150 265 452 1900
3 AB2002 125 987 452
4 AB2003 1908 125 608
5 AB2004 50 240
I want to create macro to sum rows which are next to AB2002 and till the empty row. In my example it is B3:C3-but it would be changed on the other product, so the cells has to be changeable-. I want to attend this sum to one object for example "table".
dim table as long
table=Sum.........
and as I mentioned before our stock value is 1300 and I will compare "table" with 1300. If "table"<1300 then I will continue to sum the other full cells which are nest to AB2002 so it will be B3:E3. Then now "table" will be new sum. I will compare it again with 1300. If it is <1300 then continue sum, else I will order this product on its last full cell's delivery time which is the columns headline.It will be Aug.26 for my exp.
Now I stuck at this point, could you help me for this situation,pls?
Bookmarks