+ Reply to Thread
Results 1 to 4 of 4

VBA to highlight range and format as a table

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    VBA to highlight range and format as a table

    How to fix this VBA macro so it would highlight a range like A1 to the last row of column N and then format it as a table.
    The number of rows will always vary, so I can’t name specific row number but I also don’t want more rows than required so I just want it to go to the last row in column N that has data in a cell.

    Please Login or Register  to view this content.
    I’ve tried the following, but I know nothing about VBA. I just found a similar one online and attempted to modify it for my needs, but I get a runtime error.
    Last edited by jambog; 02-11-2021 at 04:10 PM. Reason: added code tags

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: VBA to highlight range and format as a table

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: VBA to highlight range and format as a table

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    Re: VBA to highlight range and format as a table

    Thanks, that did the trick!

+ 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. Replies: 6
    Last Post: 08-22-2019, 07:18 PM
  2. [SOLVED] Conditional Format to highlight cells in a range if any have an entry
    By Stryfe in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-28-2018, 02:50 PM
  3. Replies: 1
    Last Post: 12-19-2017, 06:50 AM
  4. Replies: 10
    Last Post: 12-11-2016, 08:01 AM
  5. Replies: 3
    Last Post: 05-20-2015, 07:03 AM
  6. [SOLVED] conditional format to highlight values out of range
    By Excel_learner in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2015, 10:34 PM
  7. Replies: 6
    Last Post: 06-29-2013, 03:56 PM

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