check if stock is out approx the 30%

User avatar
sal21
PlatinumLounger
Posts: 4353
Joined: 26 Apr 2010, 17:36

check if stock is out approx the 30%

Post by sal21 »

Possible to check if STOCK is approx the +/- 30% of SOLD, in this case i need to rearrange the STOCK.

for example:

i have var STOCK=5000, and SOLD=1985, msgbox("attention!")

Hope understand me...

User avatar
HansV
Administrator
Posts: 78446
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: check if stock is out approx the 30%

Post by HansV »

Code: Select all

    If SOLD > 0.3 * STOCK Then
        MsgBox "Attenzione!"
    End If
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4353
Joined: 26 Apr 2010, 17:36

Re: check if stock is out approx the 30%

Post by sal21 »

HansV wrote:
09 Nov 2021, 13:33

Code: Select all

    If SOLD > 0.3 * STOCK Then
        MsgBox "Attenzione!"
    End If
WORK!

now about SOLD and STOCK how to calculate the percentage... based STOCK ?

User avatar
HansV
Administrator
Posts: 78446
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: check if stock is out approx the 30%

Post by HansV »

For example Format(SOLD / STOCK, "0%")
Best wishes,
Hans