Excel experts, please help

Status
Not open for further replies.

Vegitto

Diamond Member
May 3, 2005
5,234
1
0
Hey all.

I'm currently working on an assignment involving the calculation of an optimum. This optimum is based on another value and needs to be rounded accordingly.

In short: We're trying to determine the optimal ordering value. This value is optimal only if the cost of ordering (and storage) is at its lowest point. This value (cost) is based on multiple equations, including one that determines the optimum. The difficulty lies in getting Excel to round either up or down (it is only possible to order an 'integer' amount) based on the cost.

I don't know if I'm making any sense at all, but if I am, please help.

Cheers!
 

GuitarDaddy

Lifer
Nov 9, 2004
11,465
1
0
Not sure from your descrption what your trying to do, but look at the following math functions

Round
Roundup
Rounddown



/insert/function/round or roundup or rounddown
 

Gibson486

Lifer
Aug 9, 2000
18,378
1
0
Not sure from your descrption what your trying to do, but look at the following math functions

Round
Roundup
Rounddown



/insert/function/round or roundup or rounddown

he knows that, he just wants excel to decide whether he rounds up or down based on the value calculated.
 

Epic Fail

Diamond Member
May 10, 2005
6,252
2
0
The unrefined solution is to make 100 rows to calculate the optimum, after the first iteration you can narrow the optimum by a factor of 100 if you can find the inflation point. Use the input values between the inflation point, divide them by 100 and repeat, after 3 times and you have a 6 significant digit optimum.
 

Vegitto

Diamond Member
May 3, 2005
5,234
1
0
there are a few ways...

('if a>b', true, false) is the general equation i think.

I used =IF(A2>A3;B3;B2)

With A2 and A3 the calculated cost (based on the rounding up and down of the supposed optimum), if the cost of A2 is higher than that of A3 (ie, A3 is lowest) B3 is taken (this value is one of the rounded optima), else B2 is taken.

You guys think this is correct?
 

Paperdoc

Platinum Member
Aug 17, 2006
2,320
285
126
Forget the IF...THEN logical operations.

akenbennu had a simple way: INT(value+0.5) will give you an INTEGER number rounded off properly. In fact, you can use this technique to build any rounding function if you just incorporate some multiplying and dividing by powers of ten.

BUT as Guitardaddy said, just use the Excel built-in function ROUND. It works like this:
=ROUND(Arg,digits)
Argument is the number you want to round off (or the cell containing it). Digits is the number of digits AFTER the decimal point. Digits can be 0 if you want an integer only, or negative if you want to round to the nearest hundreds, thousands, etc., or a positive number if you want some digits after the decimal.

=ROUND(12.3456,0) gives 12 -OP's original question
=ROUND(12.3456,-1) gives 10
=ROUND(12.3456,1) gives 12.3
=ROUND(12.3456,2) gives 12.35

A cautionary note when using rounding: you have to understand WHEN to round off. If you round off too early in a calculation sequence, you lose some useful information. On the other hand, if you fail to round off correctly and carry forward many digits that have no real information, you delude yourself.

For example, you sell oranges in bags and they each contain a dozen oranges, approximately, but the filling machine sometimes makes errors and you already have collected data showing the mean is 12.021 oranges per bag, and you also have the standard deviation of the count of oranges in a bag. Using statistics you have calculated the maximum number of oranges ever likely to be encountered (to within a 99.7% Confidence Interval) as 15.237. So, what IS the MAXIMUM number of oranges per bag? NO bag contains 0.237 of an orange mixed in with the others. The answer is 15 - plain and simple integer. You round off here.

Now, if buyers pay by the actual count at 20 cents per orange, what is the MAXIMUM price for a bag of oranges? It is NOT 15.237 times 20 cents. It is 15 (the maximum count) times 20 cents.

Now someone asks, for purposes of loading up skids of these bags of oranges, what is the AVERAGE weight (to the nearest pound) of a skid with 200 bags on it, if we also know that the average weight of one orange is 0.397 pounds? This answer needs you to keep the significant digits in the intermediate calculation: 12.021 oranges per bag x 0.397 pounds per orange x 200 bags per skid = 954.4674 pounds. NOW is where you round that result to 954 pounds (plus the weight of the skid itself to get Gross Weight).
 
Last edited:

Gibson486

Lifer
Aug 9, 2000
18,378
1
0
Forget the IF...THEN logical operations.

akenbennu had a simple way: INT(value+0.5) will give you an INTEGER number rounded off properly. In fact, you can use this technique to build any rounding function if you just incorporate some multiplying and dividing by powers of ten.

BUT as Guitardaddy said, just use the Excel built-in function ROUND. It works like this:
=ROUND(Arg,digits)
Argument is the number you want to round off (or the cell containing it). Digits is the number of digits AFTER the decimal point. Digits can be 0 if you want an integer only, or negative if you want to round to the nearest hundreds, thousands, etc., or a positive number if you want some digits after the decimal.

=ROUND(12.3456,0) gives 12 -OP's original question
=ROUND(12.3456,-1) gives 10
=ROUND(12.3456,1) gives 12.3
=ROUND(12.3456,2) gives 12.35

A cautionary note when using rounding: you have to understand WHEN to round off. If you round off too early in a calculation sequence, you lose some useful information. On the other hand, if you fail to round off correctly and carry forward many digits that have no real information, you delude yourself.

For example, you sell oranges in bags and they each contain a dozen oranges, approximately, but the filling machine sometimes makes errors and you already have collected data showing the mean is 12.021 oranges per bag, and you also have the standard deviation of the count of oranges in a bag. Using statistics you have calculated the maximum number of oranges ever likely to be encountered (to within a 99.7% Confidence Interval) as 15.237. So, what IS the MAXIMUM number of oranges per bag? NO bag contains 0.237 of an orange mixed in with the others. The answer is 15 - plain and simple integer. You round off here.

Now, if buyers pay by the actual count at 20 cents per orange, what is the MAXIMUM price for a bag of oranges? It is NOT 15.237 times 20 cents. It is 15 (the maximum count) times 20 cents.

Now someone asks, for purposes of loading up skids of these bags of oranges, what is the AVERAGE weight (to the nearest pound) of a skid with 200 bags on it, if we also know that the average weight of one orange is 0.397 pounds? This answer needs you to keep the significant digits in the intermediate calculation: 12.021 oranges per bag x 0.397 pounds per orange x 200 bags per skid = 954.4674 pounds. NOW is where you round that result to 954 pounds (plus the weight of the skid itself to get Gross Weight).

i think you missed his question....
 
Status
Not open for further replies.
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |