+ Reply to Thread
Results 1 to 5 of 5

Default code for formatting in excel

  1. #1
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Default code for formatting in excel

    Actually, we just copy few names from different places into a workbook. The problem is it copies the text in bold and also background color to the workbook.
    The copied contents do start from A2 and may run into many rows.
    I need the current workbook entirely set up to default with the following;
    Default - Font Type - Times New Roman
    Default - Proper case text
    Default - Unbold Text
    Default - No background color in cells.

    Any help on this will highly be appreciated. Thanks in advance..

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Default code for formatting in excel

    If you want to paste just the values without the format, right-click on the destination cell and select Paste Special\Text from the pop-up context menu.

    As far as resetting the format, you can easily record all those formatting steps in a macro.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Default code for formatting in excel

    hi...alphafrog thanks for your speedy response, well i agree, this does the needful.... but there are other data filled in by others who don't follow this and the book is full of with formatted and colors........and I would appreciate if you can give me a code to default all this to the required..... thanks again in anticipation.......

  4. #4
    Registered User
    Join Date
    08-08-2014
    Location
    Lancaster, PA
    MS-Off Ver
    2016 (windows & mac)
    Posts
    94

    Re: Default code for formatting in excel

    Give this a go

    Please Login or Register  to view this content.
    This probably isn't the fastest way to achieve what you want, changing to Proper Case requires looping through all the cells with text values which slows things down a little.

    If you insert this into a module if will work on whichever worksheet is active when you execute the macro.

    USE WITH CAUTION, it is not possible to undo the effects of a macro, make sure you have a back-up copy of the file until you know that it is working as intended.

  5. #5
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Default code for formatting in excel

    Yes...... thatandyward you got it exactly and it does exactly how I wanted it to be.......You have saved great time by giving me this code......Thank you so much.....God bless you......I will close this as solved and add reputation too........ .....This forum members really are Excel Maestros !!!

+ 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. [SOLVED] Excel Macro Causing the Formatting to change to Default
    By umeshbanga in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2015, 11:17 PM
  2. what vba code will allow me to select a specific sheet as the default excel view?
    By ramrez2009 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2014, 10:41 AM
  3. Excel default (Normal) cell formatting in 2007?
    By brianguy in forum Excel General
    Replies: 3
    Last Post: 10-14-2009, 06:38 PM
  4. [SOLVED] Excel autofill should default to copy without formatting.
    By aske in forum Excel General
    Replies: 0
    Last Post: 12-15-2005, 06:30 PM
  5. [SOLVED] excel conditional formatting default
    By jhkarr in forum Excel General
    Replies: 2
    Last Post: 11-10-2005, 03:10 PM
  6. [SOLVED] how to change the default formatting of comments in excel?
    By Zach in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-19-2005, 07:05 AM

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