Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Senior Member
 
Posts: 118
Default how to get a range of cells rounded off to the nearest value?

i have the following data in cells A2:E2. (14.1,25,26.8,17.9,,48.6) i want to get the figures without the decimals. i tried the following with negative result.
=Round(A2:E2,0)
i can get the required result in three steps
1.=Sum(A2:E2,0) gives me the result with one decimal
2.select cell at the top and click on the ribbon to reduce the decimal to nil.
3. use the fill handle
is it possible to accomplish the task with one formula? thanks
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by sumesh56 View Post
i have the following data in cells A2:E2. (14.1,25,26.8,17.9,,48.6) i want to get the figures without the decimals. i tried the following with negative result.
=Round(A2:E2,0)
i can get the required result in three steps
1.=Sum(A2:E2,0) gives me the result with one decimal
2.select cell at the top and click on the ribbon to reduce the decimal to nil.
3. use the fill handle
is it possible to accomplish the task with one formula? thanks
Use round on single cells rather that the range.
So, =ROUND(A2,0) and drag/copy across.

If these cells show as having a decimal place but all of those are zero, then it's formatting rather than the formula not working.

Also worth considering ROUNDDOWN / ROUNDUP depending on how ou need the results. 17.9 for example wold become 18 with ROUND or ROUNDUP, but 17 with ROUNDDOWN.
  #3   Report Post  
Member
 
Posts: 93
Default

Hi sumesh56

Or summing the interger (Without rounding)
=SUMPRODUCT(INT(A2:E2))

Quote:
Originally Posted by sumesh56 View Post
i have the following data in cells A2:E2. (14.1,25,26.8,17.9,,48.6) i want to get the figures without the decimals. i tried the following with negative result.
=Round(A2:E2,0)
i can get the required result in three steps
1.=Sum(A2:E2,0) gives me the result with one decimal
2.select cell at the top and click on the ribbon to reduce the decimal to nil.
3. use the fill handle
is it possible to accomplish the task with one formula? thanks
  #4   Report Post  
Senior Member
 
Posts: 118
Default

Quote:
Originally Posted by Spencer101 View Post
Use round on single cells rather that the range.
So, =ROUND(A2,0) and drag/copy across.

If these cells show as having a decimal place but all of those are zero, then it's formatting rather than the formula not working.

Also worth considering ROUNDDOWN / ROUNDUP depending on how ou need the results. 17.9 for example wold become 18 with ROUND or ROUNDUP, but 17 with ROUNDDOWN.
thanks for the guidance. have a nice day.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
show fractions rounded up to nearest 1/16th inch John G.[_2_] Excel Discussion (Misc queries) 17 April 23rd 23 03:43 AM
Average rounded to nearest 0.50 Anthony[_5_] Excel Discussion (Misc queries) 4 August 31st 09 06:28 PM
Allocated amount rounded to nearest .25 without exceeding total sheri Excel Worksheet Functions 6 August 25th 09 04:40 PM
Ensuring input is rounded up to nearest 10 RayC Excel Discussion (Misc queries) 6 November 25th 07 06:31 PM
Calculating parts costs rounded to the nearest $15 in Excell Mmellex Excel Programming 1 June 19th 06 06:53 AM


All times are GMT +1. The time now is 06:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"