Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CALCULATE percentage of STOcK...

Status
Not open for further replies.

sal21

Programmer
Apr 26, 2004
425
IT
Paraph i'm stupid...

i have a STOCK(in pieces)=5000, and i have sold 140 pieces, how to calculate the percentage?

the var are STOCK, and PIECES
 
(PIECES / STOCK) * 100

Code:
Dim intSTOCK   As Integer
Dim intPIECES  As Integer

intSTOCK = 5000
intPIECES = 140

Debug.Print (intPIECES / intSTOCK) * 100 & "%"

We don’t call people ‘stupid’, we call them ‘special’…


---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
Hello...? Did that work for you?
... Anybody here... [ponder]

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
sal21 has a bad habit of leaving a conversation hanging and not responding after a previous response.

It sure does not help other members who like to browse these forums and pick up good tips.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
Perhaps sal21 is a devote Marxist.

They do appear quite needy.

Karl Marx said:
From each according to his ability, to each according to his needs.
 
tks Andrzejek, your code work fine!

sorry but busy...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top