Thanks Sam and Don both are working good. Sandeep Chhajer. Sent on my BlackBerry® from Vodafone
-----Original Message----- From: "dguillett1" <dguille...@gmail.com> Sender: excel-macros@googlegroups.com Date: Thu, 16 Feb 2012 08:42:20 To: <excel-macros@googlegroups.com> Reply-To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Round of numbers Or try this Sub RoundUpNonFormulasSAS() Cells.SpecialCells(xlCellTypeConstants, 1).NumberFormat = "0.00" End Sub Don Guillett SalesAid Software dguille...@gmail.com From: Sam Mathai Chacko Sent: Thursday, February 16, 2012 8:06 AM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Round of numbers Sub NumRoundTwo() Dim rng As Range With ActiveSheet.UsedRange If Not .SpecialCells(xlCellTypeConstants, 1) Is Nothing Then For Each rng In .SpecialCells(xlCellTypeConstants, 1) rng.Value = Round(rng.Value, 2) Next rng End If End With End Sub Regards, Sam Mathai Chacko On Thu, Feb 16, 2012 at 7:08 PM, <chhajersand...@gmail.com> wrote: Dear Excel gurus, I have a sheet with figures and formulas. I want a macro which can convert all the numbers in to round off up to two decimal but not the formulas. Like if in any cell value is 22.455 Macro should do +round(22.455,2) automatically. But if it is sum(a2:a9). It should remain same. Thanks in advance. Sandeep Chhajer. Sent on my BlackBerry® from Vodafone -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- Sam Mathai Chacko -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com