Hi.
I wrote a simple function to calculate the number of weeks a certain stock can last against a production plan.
The variables I'm using are either integer (4) or double (1). See the arguments definition for your reference:
Public Function Week_Stock(cini As Integer, cfin As Integer, Stock As Double, row As Integer, prev As Integer)
All integer variables are passed on perfectly but the Stock variable always passes a zero when indeed it has a much higher number. If I Copy-Paste Values that number, then it works fine.
I've checked the formatting and it's formatted as number. I tried using the round function to limit the decimals to 3 and it still doesn't work.
Can anyone help me with this?
Thanks.
Pedro
Bookmarks