Function: Stock calculation with decimals

Adil Kh
Adil Kh used Ask the Experts™
on
Hello @Saqib Husain, Syed hello everyone,

I am refering to the genius solution of Saqib Husain, Syed concerning the stock calculation https://www.experts-exchange.com/questions/29096373/Stock-cost-error.html.
And I want to ask you how to modify the code in order to accept also the quantity as number with decimals; three decimal digits. for example 125,586.  The decimal symbol I have is my Excel software is","  that Saqib Husain, Syed had adapted the code for me.

Please find attached the file

Thank you
Draft1.xlsm
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Change

    Dim qty As Integer

to

    Dim qty As Single

Author

Commented:
Thank you Saqib Husain, Syed thank you all

Author

Commented:
Hello Saqib Husain, Syed,

I want to ask you about this line of the code
If ctr > 1000 Then End: Stop

Open in new window

What do you mlean by 1000 is it a limit of calculation?

Thank you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial