Hello,
I'm trying to figure out how much freight I am paying per sq ft of a product I sell. I'm entering all information into a userform. I enter the "Freight" which is the total freight I'm paying, the "sqftsum" is the total amount of square feet, and the "frsqft" is the freight per square foot that needs to be calculated. When I use the code below, assuming the total freight was $5 for a total of 173.45 square feet, the total it gives me is 2.88267512251. It should be 0.0288267512251. No idea why it's moving the decimal place over 2 spots, and if I try dividing the answer by 100 nothing happens. Hoping someone can help me make sense of this! Any help would be appreciated. Thanks.
If Not Freight = "" Then
x = 1
sqftsum = 0
Do
sqftsum = sqftsum + ListBox1.List(x, 3)
x = x + 1
frsqft = (Freight / sqftsum)
Loop Until x = c
End If
I'm trying to figure out how much freight I am paying per sq ft of a product I sell. I'm entering all information into a userform. I enter the "Freight" which is the total freight I'm paying, the "sqftsum" is the total amount of square feet, and the "frsqft" is the freight per square foot that needs to be calculated. When I use the code below, assuming the total freight was $5 for a total of 173.45 square feet, the total it gives me is 2.88267512251. It should be 0.0288267512251. No idea why it's moving the decimal place over 2 spots, and if I try dividing the answer by 100 nothing happens. Hoping someone can help me make sense of this! Any help would be appreciated. Thanks.
If Not Freight = "" Then
x = 1
sqftsum = 0
Do
sqftsum = sqftsum + ListBox1.List(x, 3)
x = x + 1
frsqft = (Freight / sqftsum)
Loop Until x = c
End If