+ Reply to Thread
Results 1 to 16 of 16

Make all numbers rounded and no decimals in entire workbook

  1. #1
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Make all numbers rounded and no decimals in entire workbook

    anyone know a macro to accomplish this? the problem is if you have dates in workpaper, it screws the dates up because they are recognized as numbers

    any help appreciated

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,713

    Re: Make all numbers rounded and no decimals in entire workbook

    Hi FLYFRG,

    Try below code a copy of your file ...

    Edit: The code will convert all rounded numbers without the formulas
    Please Login or Register  to view this content.
    Last edited by nankw83; 09-30-2022 at 01:39 AM.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Re: Make all numbers rounded and no decimals in entire workbook

    thanks- doesnt seem to be working for me

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,713

    Re: Make all numbers rounded and no decimals in entire workbook

    Does it give any error ? Can you post a sample file to see what?s happening

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Make all numbers rounded and no decimals in entire workbook

    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  6. #6
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Re: Make all numbers rounded and no decimals in entire workbook

    where do i attach sample file?

  7. #7
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Re: Make all numbers rounded and no decimals in entire workbook

    here is my file with macros
    Attached Files Attached Files

  8. #8
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,713

    Re: Make all numbers rounded and no decimals in entire workbook

    Ok, revised code ...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Re: Make all numbers rounded and no decimals in entire workbook

    you are awesome!! however i notice that if numbers are in currency format it doesn't do the trick- it only works if theyre numbers like 22.4456 but if its $22.4456 nothing happens

  10. #10
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Re: Make all numbers rounded and no decimals in entire workbook

    also is it possible to see the commas still? like i want 2599.66 to become 2,600 not 2600

    THANK YOU

  11. #11
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,713

    Re: Make all numbers rounded and no decimals in entire workbook

    The code does work on currency as you can see in attached file ... In addition, it will retain the original number format of the cell. If it was "general" then it won't show the thousand comma separator .. Check the attached file
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Re: Make all numbers rounded and no decimals in entire workbook

    thank you so much- only issue is if i want lets say 1000 to appear as 1,000 it doesnt show that - any way to "force" it to show commas regardless if original number format of cell was general of whatever?

  13. #13
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,713

    Re: Make all numbers rounded and no decimals in entire workbook

    Add below line in red
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Re: Make all numbers rounded and no decimals in entire workbook

    you are a legend my friend- thank you

  15. #15
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,713

    Re: Make all numbers rounded and no decimals in entire workbook

    Glad I could help .. If that takes care of your question, please take a moment & mark this thread as [SOLVED] from the Thread Tools above your first post

  16. #16
    Registered User
    Join Date
    07-03-2022
    Location
    NY, USA
    MS-Off Ver
    365
    Posts
    10

    Re: Make all numbers rounded and no decimals in entire workbook

    only issue is if i have lets say a date somewhere in workbook 11/22/2005- the macro will pull that and convert to number like 51442 - how do we avoid that ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-30-2022, 11:04 AM
  2. Make all numbers rounded and no decimals in entire workbook
    By FLYFRG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2022, 04:52 PM
  3. how to get the result with two decimals rounded off
    By sumesh56 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-25-2017, 09:31 AM
  4. Make macro work for entire workbook
    By nkitchen31 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-29-2013, 05:49 AM
  5. Replies: 4
    Last Post: 06-30-2009, 09:19 AM
  6. SumsWhen cells are rounded to 3 decimals
    By madmam in forum Excel General
    Replies: 2
    Last Post: 07-27-2006, 12:00 PM
  7. How do I make a copy of a entire workbook?
    By Jan B. in forum Excel General
    Replies: 2
    Last Post: 05-31-2006, 07:25 PM

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