Results 1 to 11 of 11

VBA for adding borders to a range based on condition?

Threaded View

  1. #1
    Registered User
    Join Date
    07-07-2009
    Location
    Louisiana, United States
    MS-Off Ver
    Excel 2007
    Posts
    19

    VBA for adding borders to a range based on condition?

    I have a spread sheet I use to track tools. One tool may be checked out / returned several times a week. When I do custom sorting I end up with the Tools listed neatly by date and number. EX:

    A1 b1
    7/11/09 Tool1
    7/12/09 Tool 1


    7/11/09 Tool3
    7/12/09 Tool3 etc.

    I have a macro that inserts a blank row between dissimilar tool numbers. What I'd like to add is another macro that adds a box border around the range of cells for each particular tool. So that it looks something like this.

    ___________________________________________________________

    7/11/09 Tool1
    7/12/09 Tool 1
    ___________________________________________________________

    ___________________________________________________________
    7/11/09 Tool3
    7/12/09 Tool3 etc.
    ___________________________________________________________

    The problem I'm having is that each time I add a new row to a particular tool number - I have to go in and manually adjust the border. I don't know enough to account for an unspecified range of cells - I never know how many times a tool will be used - or consequently how many cells the box border wit will need to go around.

    Any help would be appreciated.
    Last edited by antonymiller; 07-14-2009 at 03:46 PM. Reason: solved

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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