+ Reply to Thread
Results 1 to 8 of 8

How to adjust macro to format different worksheets?

  1. #1
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    How to adjust macro to format different worksheets?

    I have the macro below that works well, the only issue is a format part that only works for one sheet. The text in orange works well, the text in red doesn't which I think is weird considering their the same except for the name of the tab.

    HTML Code: 
    Last edited by AccountingJ; 05-23-2018 at 04:27 PM.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: How to adjust macro to format different worksheets?

    On both sections you are missing a . infront of Columns, it should be
    Please Login or Register  to view this content.
    otherwise those 2 lines will work on the active sheet

  3. #3
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: How to adjust macro to format different worksheets?

    Thanks, that fixed the autofit part but the
    HTML Code: 
    section still doesn't format properly for either tab.

    Also any ideas on how to automatically sum all of column C in the incoming and outgoing tabs? The range changes.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: How to adjust macro to format different worksheets?

    Try
    Please Login or Register  to view this content.
    Note I've moved the Next i & end with.

  5. #5
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: How to adjust macro to format different worksheets?

    I get an error "Compile error: For without Next". See attachment and run.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: How to adjust macro to format different worksheets?

    You've deleted the
    Please Login or Register  to view this content.
    Not moved them

  7. #7
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: How to adjust macro to format different worksheets?

    That was it! Sorry I read it the first time you posted but I didn't catch it.

    Thank you

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: How to adjust macro to format different worksheets?

    Glad to help & thanks for the feedback

+ 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] assistance to adjust code to sum on their specific worksheets in vba
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2017, 04:00 PM
  2. [SOLVED] Macro to automatically adjust chart format?
    By Thirsa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-25-2013, 12:22 PM
  3. MACRO to change the format of all worksheets into a specified format
    By usama.anwar in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-01-2013, 04:57 PM
  4. Macro to format cells, adjust column widths, hide cells
    By amsolmyers in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2010, 04:44 PM
  5. Format Macro - apply to all worksheets
    By philwilliams80 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2008, 09:24 AM
  6. VBA to adjust all worksheets to fit 1 by 10 for printing
    By neodjandre in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2007, 12:11 PM
  7. How do I use a vertical look up to adjust a graph format?
    By jaypuhreps in forum Excel General
    Replies: 1
    Last Post: 03-24-2006, 12:40 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