+ Reply to Thread
Results 1 to 4 of 4

Automate removal of ROUND from formulas

  1. #1
    Registered User
    Join Date
    11-03-2012
    Location
    CO, USA
    MS-Off Ver
    Excel 2013
    Posts
    26

    Question Automate removal of ROUND from formulas

    I have a large number of formulas of the type below. "blahblahblah" is different for each formula and I want to preserve that part of each formula.

    =ROUND(SUMIFS(blahblahblah),1)

    Need to remove "ROUND(" and ",1)" and leave the rest of the formula intact. Wildcarding doesn't seem to work in Excel 2007 for the Replace functionality. Any ideas? I don't know VB, I do know how to run a macro (may need some pointers on how to install it though).

    Thanks.
    Last edited by Lis7; 12-07-2012 at 04:49 PM.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Automate removal of ROUND from formulas

    This could be easily done with a macro.

    Please Login or Register  to view this content.

    Macros are very easy to install and use:

    1. ALT-F11 brings up the VBE window
    2. ALT-I
    ALT-M opens a fresh module
    3. paste the stuff in and close the VBE window

    If you save the workbook, the macro will be saved with it.

    To use the macro from the normal Excel window:

    1. ALT-F8
    2. Select the macro
    3. Touch Run



    To remove the macro:

    1. bring up the VBE window as above
    2. clear the code out
    3. close the VBE window

    To learn more about macros in general, see:

    http://www.mvps.org/dmcritchie/excel/getstarted.htm
    Last edited by Jakobshavn; 12-07-2012 at 04:34 PM.
    Gary's Student

  3. #3
    Registered User
    Join Date
    11-03-2012
    Location
    CO, USA
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Automate removal of ROUND from formulas

    Jakob, one follow-up question - how would I run this on selected columns?

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Automate removal of ROUND from formulas

    This restricts the macro to act only on column D:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1