trying to write a vba code to determine materials required to meet 30 days of stock

Copper Contributor

need an excel macro vba code to auto calculate the "Requirement" to keep the days of stock at at least 30 days. For example, if the "days of stock" in july is >= 30 days then the "requirement" in june is 0 however if the "Days of Stock" is < 30 then the "requirement" in june should generate the material required to keep it at 30.

Attached is the file and snapshot of my code so far, any assistance would be appreciated

1 Reply

@coreylameen19 

 

DateAdd function

Returns a Variant (Date) containing a date to which a specified time interval has been added.

 

DateDiff function

Returns a Variant (Long) specifying the number of time intervals between two specified dates.

 

Just for additional information, maybe it will help you. If not, please ignore.