+ Reply to Thread
Results 1 to 3 of 3

Want to automate some formatting functions

  1. #1
    Forum Contributor
    Join Date
    05-07-2007
    Location
    Singapore
    MS-Off Ver
    2006/2016
    Posts
    170

    Want to automate some formatting functions

    Hi All

    I have this attached example file, the 1st page is the raw data and the 2nd page is the ideal formatting I'm trying to acheive

    What I need is for:
    The cells in column A to be merged if the name is the same
    The thick black outline to be applied to encircle every different unique name

    How do I do this? Do I need to use a macro or is there a way to set the conditional formatting?
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Want to automate some formatting functions

    hi there. that's a very good sample file. try:
    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor
    Join Date
    05-07-2007
    Location
    Singapore
    MS-Off Ver
    2006/2016
    Posts
    170

    Re: Want to automate some formatting functions

    had to tweak the code abit but I got what I need

    Only thing is that my source file does not come with the hairline lines in the middle (as shown in the pic). I originally planned to add them using conditional formatting but conditional formatting overides what the macro does. How do I tweak the code to add those hairline borders in?
    Attached Images Attached Images

+ 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. Automate school class enrollment functions
    By thmeans06 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-08-2016, 08:18 PM
  2. Is it possible to automate formatting?
    By KMM 80525 in forum Excel General
    Replies: 8
    Last Post: 12-14-2012, 08:47 AM
  3. Replies: 4
    Last Post: 10-19-2011, 08:20 AM
  4. VBA coding to automate certain functions in workbook
    By jacglc2010 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2010, 01:32 PM
  5. [SOLVED] combine worksheet functions to make macro to automate everything
    By mike in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-21-2005, 01:20 PM
  6. Automate cut/paste functions - Help!
    By Greg in forum Excel General
    Replies: 2
    Last Post: 06-13-2005, 03:05 PM
  7. VBA functions to automate pricelist
    By nosferer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2005, 08:58 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