+ Reply to Thread
Results 1 to 5 of 5

Macro that can draw borders in cells with data across multiple sheets in a workbook

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    copenhaguen
    MS-Off Ver
    Excel 2010
    Posts
    11

    Macro that can draw borders in cells with data across multiple sheets in a workbook

    Hello;

    What I need is a macro that can draw borders in cells with data across multiple sheets in a workbook. I already have the following code that almost can do it:

    Please Login or Register  to view this content.
    The problem I have is that it does not find the last row in all the sheets. What it does instead is that it finds the last row in the sheet that I run the macro from, and then It will use the value of the last row in this specific sheet in all other sheets. So for instance, if I run the code from sheet 3 that has 72 rows with data, It will draw tables (borders) with 72 rows in all my sheets, even though the number of rows with data in the different sheets are not similar.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro that can draw borders in cells with data across multiple sheets in a workbook

    Please Login or Register  to view this content.
    Should be

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    copenhaguen
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Macro that can draw borders in cells with data across multiple sheets in a workbook

    Thank you very much AB33.

    Is it possible to further develop the code, such that it also finds the last column to draw a border on automatically, rather than having it drawing borders until column h all the time??

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro that can draw borders in cells with data across multiple sheets in a workbook

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-30-2013
    Location
    copenhaguen
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Macro that can draw borders in cells with data across multiple sheets in a workbook

    Nice. Thank you

+ 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] Macro to copy cells from multiple sheets in workbook to multiple sheets in other workbook
    By KeithMale in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2013, 05:37 PM
  2. Help! Macro to consolidate data from multiple workbook sheets!
    By Sainath Krishnan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2012, 08:18 AM
  3. Replies: 1
    Last Post: 01-21-2012, 07:43 AM
  4. Draw Data from multiple sheets:
    By markellis88 in forum Excel General
    Replies: 0
    Last Post: 06-07-2009, 08:49 AM
  5. Using a macro to draw borders
    By Jen5309 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2008, 02:58 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