Close Window
Free Ebook
Get Your Free Excel
Top 15 Excel Tutorials from
Instant Access!

Round To The Nearest Whole Number

I want a calculation to yield a result that is a whole number. Is there a way of doing this where it won't give a result that's just rounded not to include decimal places i.e. if I increase the number of decimal places, it will still be the whole number.

I want to work out 5% of a number so my formula is =E5*0.05. Can I add something to this to result in the calaculation giving a whole number?


Free Excel Courses

Similar Excel Tutorials

How to round a number up or down and also to a specified number of decimal places in Excel.  This will allow you to ...

Round each number to a specific decimal number. This works for numbers that don't already have a decimal and ones t ...

How to get the integer part, the whole number, from a number that has a decimal after it. This does not round the n ...

How to show a smaller number that looks better without sacrificing decimal places or precision in the actual number ...

Helpful Excel Macros

- This free Excel macro formats a selected cell as an Accounting number. This means that the accounting number format is

- This free Excel macro formats selected cells in the Number or Numerical number format in Excel. This means that the cel

- This Excel macro filters a set of data in Excel and displays only the top X percent of that data. This means the highes

- This free Excel UDF allows you to get the numbers out of a cell that contain both text and numbers. This is a great fun

- Count words in cells with this user defined function (UDF). This UDF allows you to count the number of words that are w

Similar Topics

Hi Guys,

Could you be so kind as to provide some code that will enable me to display a text box on a userform rounded up to 1 decimal place.

Where am I going wrong....
it calculates the number entered in textbox1 and divides it by a value that changes in cell O26 but the answer is in about 8 or more decimel places.
Only need like 65.3 as an answer not 65.277756942

This is the code ive used.

Private Sub CommandButton1_Click()

TextBox2.Value = Val(TextBox1.Value) / Range("O26").Value

End Sub

i've been trying to figure this out on my own but seem to be hitting road blocks.

i have a column of numbers that we extracted from a database as whole numbers. for instance, 30 should be .30 and 100 should be 1.00. when i try to increase or decrease the decimal point it doesn't allow me to convert it to those positions.

would any one have a tip of how i can easily convert this? there are over 2000 entries in my excel spreadsheet so to do it manually would take a lot of time/effort.

thank you!

I have a spreadsheet set up with an employees information, including the start date. After each year that the employee is working, he gets bumped up on the pay scale. For this reason, I only need to know how many years the employee has been working, rounded down to the nearest year.

This is what I have so far (hire date is in column B):

=((TODAY()-B4)/365)&" YEARS"

This function gives me a number with many decimal places.

I tried:

=ROUNDDOWN((TODAY()-B4)/365),0)&" YEARS"

It tells me I have too few arguments. Please help!

Hi, can anyone help me with the below...

Im looking for a vlookup formula which will give me the maximum number from a list which contains multiple matches, i.e.

Lookup number 1 from column A, then give me the largest number from column B

example table:
1 5
2 2
1 11
3 2
4 5

the result would be 11

thanks all!

Hi Guys

I have the following in G2:


The formula returns the correct result, which in this case is a number - 2

When I fill down my range, the formula copies correctly, but every result is the same. 2.

However, if I go to the next cell down (G3) and activate it by pressing F2, and then hit Enter, the result changes and is now correct.

Any ideas whats going wrong?


I'm quite experienced Excel user. I've never come across this problem but tinkering in every conceivable way within Excel settings and the solution has eluded me.

I have added a worksheet created elsewhere (it is a form I need printing, with the data coming from 2 sheets I have created from scratch) which has pre formatted cells for Date and Client Name etc.

When I try to reference the cell in this added sheet from my 2 sheets, instead of the result, it always displays the formula, not the result.

I have tried doing it from one of my sheets to reference to this new, and that displays the result and not formula. I can't imagine why it's doing this and I've never seen it happen before.

Formatting cells, giving cells names rather than the usually adequate of reference to the Cell Number doesn't change things. I wonder if I've picked up some legacy protection from the original form but can't see anywhere in the tools etc that's obvious.

There's about 50+ cells that need referencing and I got to get this done for work.

Please help me. This is my first need to post on a Excel Forum as I've always found help or answers from other peeps or internet but this one is making me scratch my head big time.

Hello everyone, I am new to this forum and have been using excel for about 3 years. I have learned alot but still can not figure out how to make numbers add up in one box like a running total. Meaning, If I have a list and in the list is one cell for each item say like cell a1 is for a can of coke and cell a2 is for a car tire and so on,and i want to keep a running total by adding a number to cell a1 or a2 like say "3 i.e. 3 tires or cans of coke" and later that day i come back and need to add 2 more i want to be able to just click on the cell a1 or a2 and enter the number 2 and the cell would add the number in it to the number im adding to it to show a result of 5 tires or whatever. I am sorry If i am not asking the question in an understandable manor but its the best way I can think to ask anyways, any help would be appreciated, Thanks in advance.


I am needing a formula that would cause a currency amount from a calculation to round up or down to the nearest 100.00 mark. The current formula is ie: =E10*F10 (e10 being an amount of money and f10 being a percentage fo it.) I am needing the resulting answer to round up or down to the nearest 100. So if the answer is below the 50 mark it would round down and above it would round up. If that is not possible then just rounding down would be acceptable.

How do i do this??



Here is my issue:

I have a list of SKUs in Excel and I need to add one same word to 500 cells that have pre-existing text in the cells. See example below:

1) List of SKU's in cells:


2) text that needs to be added IN FRONT of every number:


So the result would be:


How do I do that in a formula and not manually? I found another similar thread and I understand how to do it from the instructions there but the same text goes on the back and the result is: 34DF but I need it to be like: DF34.

I am using Office 2007 for mac.

Thank you for the help,

Hi there

Please can someone help me. How do I create an IF formula to find cells where the number of hours in one cell is more than the number of hours in another cell? eg one cell has 0.40 hrs and another has 02.25 hours - I want have an IF formula to say where 02.25hrs > 0.40 then type "FAILED" but I cant overcome the greater than problem on the hours which is giving me the wrong answer.

Hi folks,

Hoping someone can help me quickly as I'm pulling my hair out and have a deadline getting too close.

Been trailing the net and this board but can't work out how to do a simple variance.

How do I work out the difference between two numbers - including negatives.

If the numbers are all positive, it's fine as it's simply a case of A - B = C which is your difference. However, that doesn't work if B is negative.

I need a formula that would give the following:

First Number / Second Number / Difference
1 / 5 / 4
1 / -5 / -6
-1 / 5 / 6
-1 / -5 / -4
-5 / -1 / 4

Hopefully there's a simple function I've been missing.

Thanks in advance, R

I'm trying to write a formula that will automatically take a group of football (soccer) scores, compare them with a set of predictions, and then allocate points according to how close the predictions are to the actual scores.

Manchester United 3 - 0 Arsenal
Prediction: 4 - 1
Points: 1

I've found a formula online that works for most scores; the correct score (e.g. 3 - 0), a correct win (e.g. 4 - 1), and in the case of a draw (e.g Man Utd 1 - 1 Arsenal, and the prediction 2 -2), correct draw (but not the correct score). The points are as follows: Correct draw (Prediction = result): 4 Correct win (Prediction = result): 3 Correct win, incorrect score (Winner correct, score not): 1 Correct draw, incorrect sco 1

The formula I found online for all but the correct draw is: =IF(A3&B3=C3&D3),3,IF(AND(A3=B3,C3=D3),1,IF(AND(A3>B3,C3>D3),1,IF(AND(A3<B3,C3<D3),1,0)))))

Could someone help me work out how I can write a formula to add before the above that will check the contents of four cells (the home score, away score, home prediction, away prediction), and if the number in all 4 cells are the same, allocate 4 points? I've tried using averages, but some combinations would void this. I've also used the SUM function, but the same happens, as with MULTIPLYING.

Something like =IF(A3:D3) are equal, 4,0

Below are a few examples of what I mean:
(Result) (Prediction) (Points)
3 - 3 3 - 3 4
2 - 1 3 - 1 1
1 - 0 1 - 0 3
3 - 3 2 - 2 1

Apologies in advance if I haven't explained this clearly enough.



Hi All,

I am trying to make excel automatically add a leading zero to values which are 5 digits long;

i.e. number input is 15185, then excel automatically changes it to 015185.

If I put a Customer Number Format of 0##### it works, however, a user could put any length of number into these cells, and if the number is less than 5 digits I don't want a leading zero.

Is there any way of writing a small macro to sort this out.

The numbers would be input into range B16:223.

Many thanks,


Hi all,

Probably a simple little function, help would be appreciated!

I'd like to take a number entered into one cell ie. A1 = 20

and split it randomly but evenly over 3 other cells ie.

Number should be whole and no zeros?

Thanks all!

Hi there, I have a string of numbers and I would like to add zeros to the end of it.

For example my numbers are formatted like this: 1234 and I would like to add zeros to the end so it looks like this: 123400 (no decimal).

I would do it manually but I have a column of over 2000 different numbers.

Thanks for your help, you guys are great!

Good afternoon,

Is there a way to enter a colon into a standard number to create a value that can be formatted into a 24 hour time value ?

eg a time is listed as 1345 with a general number format, and I want it returned as 13:45 witha custom format of hh:mm.

Other than creating a table and using a vlookup function, I am hoping there is a better way?


In excel, I tried to convert numbers to number format, using
format/cells/number from the category list. But it won't take, and stays
text-like. Any ideas?

How do I calculate the number of batches per hour? Here's what I have so far:

Cell B5: start time: 4:15 formatted as 4:15:00 am
Cell B6: finish time: 6:15 formatted as 6:15:00 am
Cell B7: total time: 2:00 formula in cell: =TEXT(B6-B5,"h:mm")
Cell B8: total batches processed: 22 (this is entered manually)
Cell B9: batches per hour: formula in cell: =B8/TEXT(B7,"h")

as long as I have this formula in cell B9 the answer comes out correct which should be 11 per hour.
If the formula in B9 is B8/B7, the answer is 264.0, Is this because of the way excel is reading the total time or the total time is formatted as a time, not an actual number? Is this the correct way to solve the problem?
answer should be 11 per hour.

I have a spreadsheet that when I copy the formula, it copies correctly
(changes the cells it should subtract), however, the result stays the same.
It matches the formula I copied it from, even though the cells to calculate
are now different. I even did a paste special and said only formula, but
still, same result. If I actually type in the formula, it works fine, but I
have a lot I need to copy and paste. Is there a way I can fix this?


Hello, I'm trying to count the number of times a name appears across multiple worksheets but I can't seem to figure it out.

I have 6 sheets to count and all the names are in column A (from A1:A100) on each sheet. The names are not in a particular order.

On sheet 7 I want to have a cell beside each persons name that counts the number of times their name appeared on the other 6 sheets.

For example Sheet 7 (called total) would have

Joe 5 (where 5 is the outcome of the formula I'm looking for to count all the times "Joe" appears on sheets 1-6).

I have it counting per sheet with =COUNTIF(A1:A130,"name") but this is not quite what I am looking for.

Thanks in advance for any advice.

Edit: I am using Excel 2007 w/ windows XP

Here's my formula... =SUM(S7)-T5

If that number is less than -100, I want it to show as blank.

Any help?

Right now, I'm trying to accomplish this by making a conditional format...meaning when my cell equals less than -100 I make the cell color and font the same (so it looks blank, but its not). When I print it, it still shows the negative value.


Peace to you all
I'm still new here but after I searched the forum I found great work done
for the needy like me.
So I'm so hopeful
I'm concerned with making a timetable for my school which we used to do it manually
I need a code to distribute each teacher timetable with the following basis:
the number of classes_ the teacher is assinged to work with_multiplied by the number of periods ( which is changeable ).
e.g ; Teacher 1 has 2 classes (1-1 &1-2). Each class should be visited 9 timea a week.
So Teacher 1 should work 18 periods a week
the distribution I need 'd look like the example in Sheet("timetable")
Please don't let me down
any help 'd be greately appreciated

I am trying to correct a formula for a productivity worksheet in excel. The idea is that we would have the ability to input the number of hours worked each day and the number of direct hours (working with clients) per day. Then take the daily percentages and add them then devide them to determine the final productivity percentage for the week. Additionally not everyone works a full week so I would need it to only divide the percentages of the days that were completed. Any suggestions? or does anybody know a formula that would accomplish this already? I am good with basic excel and was able to identify a flaw in the current productivity sheet.

I feel like this should be really easy and I am just out of it today but I cannot figure this out. I want to lock a row and filter (with filter,not sort, tool) the other rows. I attached an example

The row in RED I want to never be changed or added in the filter, but I want row 2 and 1 to filter together. So I want (in this case) the flavor to filter with the same number. SO i guess the filter process would be dependent upon the total number of votes. Any ideas? Thanks!

I had to create the information in tables and went from there. Got it. Thanks!

I am trying to figure out how to write a formula to figure out production cycle time.
We will be building 8 "widgets" a day.
We will work 10 hours a day.
There is a 20 minute break at 9:20 am.
Production shuts down for lunch 30 minutes for lunch at 12:30.
Production starts at 6:00 am.
Here is what I can do.
Production cycle time = (10*60)-30/8 or 71.25 minutes
If we start at 6:00 am, the first scheduled cycle completion time = TIME(6,0,0+71.25/1440)

My problem is when I am trying to use a logical "IF' statement to account for the 20 minute break or lunch and still calculate the end of each cycle time through the day I receive a number of error messages.
This is the formula I am trying to make work. I have the cell the formula is in, formatted with a "mm,ss" format.
I have included an attachment to help (a picture is worth a thousand words).

Any help will be greatly appreciated.
I have bought a number of books in an attempt to figure this out, and I am still stumped

Related pages

litre per 100km to mpgmacro to insert rows in excelunprotect cells in excelexcel roi formulavba compile errorconvert kgs into stonescreating a roadmap in excelexcel unprotect workbookopening accdb filesformula for present value of perpetuityconvert kg to pounds and stonehow to calculate variance in excelexcel lock cell from editingexcel vba password crackuserform loadcounting colours in excelhow to wrap text in google spreadsheetexcel macro not workingmultiply formula in excelvlookup won t workpayslips template free downloadvba wildcard charactersembed excel in powerpointvba connection stringcombine first and last names in excelcool vba macroshow to disable a macro in excelwhat does value error mean in excelauto run macro excelest ist converterexcel competency testharvey balls in excelhow to divide numbers in excelhow to put a histogram in excelcompare two lists in excel 2010how to insert a new row in exceluppercase vbahow to create a pareto chart in excel 2007excel npercalculating cpp and eimarkdown percent calculatorvba select casevba loop untilexcel vba range clearcommand to insert row in excel3d plots excelwhat is 9.5 as a decimalfree 2d barcodekeyboard types backwardsexcel vba print areaexcel merge shortcutcalculation of ic50count cell color in excel 2010ytd formulaexcel macro rename worksheetrestore a previous version of excel fileexcel maximum file sizeunlocking an excel workbook without the passwordexcel rgb formulaexcel animated chartexcel compare tabsfreeze cells in excel 2007excel repeat headerpolynomial trendline excelconvert excel to pipe delimited text filethesaurus rowexcel linear extrapolationgetrows vbaexcel tool packremove extra spaces in excelvba application transposehow to delete extra rows in excelexcel formula countif multiple criteriapayroll spreadsheet