Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default rounding a formula in a cell, then replace the formula

You should always post your coding efforts for comment.
try this
Sub changeformula()
For Each c In Selection
x = Right(c.Formula, Len(c.Formula) - 1)
c.Formula = "=round(" & x & ",2)"
Next
End Sub

--
Don Guillett
SalesAid Software

"Robert" wrote in message
...
I want to round 50 plus cells with the rounding formula. I want to select

the cell, enter the rounding formula that will round the formula already in
the cell and replace the original formula. Example C10*C15 to
ROUND(C10*C15,2). I tried doing this with a macro and it doesn't work. The
macro changes the original formula.
--
Robert



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
Use Formula to Replace A Cell opieandy Excel Discussion (Misc queries) 3 July 5th 09 08:20 PM
rounding when referencing a cell with a formula? [email protected] Excel Worksheet Functions 5 February 29th 08 07:52 PM
rounding a number with a formula already in cell CIW Excel Worksheet Functions 1 November 29th 07 05:20 PM
rounding down another cell with a formula Steve Excel Worksheet Functions 3 January 6th 06 06:34 PM
rounding a formula in a cell, then replace the formula Frank Kabel Excel Programming 0 July 13th 04 03:52 PM


All times are GMT +1. The time now is 11:30 PM.

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

About Us

"It's about Microsoft Excel"