Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How can I round up numbers in increments of 0.5?

$
0
0

In Google Sheets I'm trying to calculate variable shipping costs.

Shipping cost is calculated by adding a fixed base price to the product of the item's weight in kg and the rate per kg:

cost = base + (weight * rate)

For example:

base=$17.49  weight=2.5 kgrate=$5.45/kg––––––––––––––––––––––––––= base + (weight * rate)= $17.49 + (2.5 * $5.45)= $31.12

The problem I'm having is that the weights must be entered in increments of 0.5 kg (500 g) and I can't figure out how to round up to 0.5.

For example, a weight of 2.1 kg should be rounded up to 2.5 , 2.51 to 3 , etc.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>