Problems to round off

Dawei

New Member
Joined
Jul 17, 2007
Messages
36
Hi,

I've got a problem. I have a cell that is called "Number of containers", this cell affects my "Freight costs" and several other cells. I want this cell to never contain decimals, I have used the format menu and changed the number of decimals shown but that does not affect the number itself. It still uses decimals when calculated. I want this cell to use no decimals and also to always be rounded off downwards (since there can never be more than a certain number of items in a container). Can I use the ROUNDDOWN function?

How do I do this?

Thankful for any help!

David
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

tactps

Well-known Member
Joined
Jan 20, 2004
Messages
3,460
Use the "Validation" function in the "Data" Menu. This will allow you to only accept whole numbers in the cell.
 

Dawei

New Member
Joined
Jul 17, 2007
Messages
36
Hi Tactps,

I have tried that aswell, but the cell still uses decimals when its calculated with.

But thank you anyway.

Dave
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
To me this isn't clear, first you said you didn't want decimal numbers in the cell, but in the last post it sounds like you do. Which one is it?
 

Dawei

New Member
Joined
Jul 17, 2007
Messages
36
Hi hotpepper,

I do not want any decimals. (My last post wanted to say that even though I used the validation menu to take away the decimals the cell still uses decimals when I use it in calculations).

Thank you

Dave
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Sorry, just to be clear. The cell you are putting the value in doesn't contain decimals, but a different cell that you have a formula in does.

If this is correct, then how about:
=INT(your formula)
 

Dawei

New Member
Joined
Jul 17, 2007
Messages
36
No worries, I didn't mean to come out as harsh.. Sorry about that.

This is how it looks like right now.

=INT(D6/D16)

Where D6 is the number of units in the order and D16 is the number of units in one container.

The function you gave me helped but I also need to make sure the cell is always rounding off downwards (since I cannot send 1.5 or 0.5 containers).

Thank you again Hotpepper.

Dave
 

Dawei

New Member
Joined
Jul 17, 2007
Messages
36
Oh..yes you're right! But I need to round up..sorry 'bout that..I seem to be all confused today!

So can I make INT to round up?

David
 

Forum statistics

Threads
1,181,053
Messages
5,927,848
Members
436,573
Latest member
CMR237

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top