+ Reply to Thread
Results 1 to 7 of 7

Fill the last row with Color

  1. #1
    Registered User
    Join Date
    03-27-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    53

    Fill the last row with Color

    How to edit the code below so that it only fills till Column N instead of the entire row??
    Please Login or Register  to view this content.

    Thanks,

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Fill the last row with Color

    Try this, assuming LR is an integer with a row number:

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Fill the last row with Color

    Oh sorry, you wanted all columns up to N, not just N. Try this:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-27-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    53

    Re: Fill the last row with Color

    I want to fill the entire Lastrow from columns A to N
    The above code just fill in the Nth column last row.

    Thanks,

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Fill the last row with Color

    You need to look at my last post, #3. Looks like you were commenting based on post #2.

  6. #6
    Registered User
    Join Date
    03-27-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    53

    Re: Fill the last row with Color

    Throwing an syntax error, even though no syntax error was found

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Fill the last row with Color

    Range("A" & LR & ":N" & LR).Interior.Color = 5287936
    Ben Van Johnson

+ 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] Click oval option button to fill/unfill color, also change border color to match fill
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-07-2015, 08:29 PM
  2. How to color-fill blank cells, then once data is entered cell is no-fill
    By hatemail13 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 07:57 PM
  3. [SOLVED]Fill Color (highlight cells) but not to print fill color
    By itszille in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-24-2012, 05:37 PM
  4. Replies: 0
    Last Post: 09-26-2012, 01:08 PM
  5. how to find a color in a row where the color is blue , if true fill with a specific text
    By jayakumar.chandran in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2012, 03:38 AM
  6. Replies: 3
    Last Post: 07-08-2010, 06:48 PM
  7. Replies: 0
    Last Post: 04-06-2009, 04:07 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