+ Reply to Thread
Results 1 to 6 of 6

AutoFill border

  1. #1
    Forum Contributor
    Join Date
    11-20-2005
    Posts
    256

    AutoFill border

    Hi all,

    Goal: if a value is in Column B, have the inside border auto fill down, in Columns D through BE.
    From Row 5 down to that row.

    This works for the row where i put the value in Column B but if i clear out some of the bottom rows
    in Column B the Format stays.

    I guess what i am trying to do is clear the format on that row if the value
    in Column B is tken out. Been trying some IF / ELSE stuff but to no avail.

    Please Login or Register  to view this content.
    Thx
    Dave
    "The game is afoot Watson"

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Try clearing the borders for columns D to BE - all rows then have your macro apply border formating

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-20-2005
    Posts
    256
    Hi mudraker,

    Thanks for your reply. As written your code clears all the Borders in Columns
    D:BE as i asked, but my code dosen't fill them back in, down to the last cell in Column B.

    So i will go back to the drawing board.

    Seems this line isn't doing anything.
    Please Login or Register  to view this content.
    I am trying to make it start on line 5, going down.
    Quote Originally Posted by mudraker
    Try clearing the borders for columns D to BE - all rows then have your macro apply border formating

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Your code starts at the bottom row in column 5 (E) and goes up. But you do not use the variable result within your code.



    Try changing your code the following 2 commands

    Please Login or Register  to view this content.
    Last edited by mudraker; 01-16-2007 at 04:23 PM.

  5. #5
    Forum Contributor
    Join Date
    11-20-2005
    Posts
    256
    Ok here is where i am at:

    It seems that it does everything i need except when i put a value
    in Column B, the formating occurs only on that row and not from
    row 5 down to that line. So all the rows in between are 'no borders'

    Please Login or Register  to view this content.


    Quote Originally Posted by mudraker
    Your code starts at the bottom row in column 5 (E) and goes up. But you do not use the variable result within your code.



    Try changing your code the following 2 commands

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    If you want to format from row 5 down to the row that was changed then you do not need to use
    LRow = Cells(5, "B").End(xlDown).Row
    Which will give you down to the last used row in Column B.

    And yes I made an error in the code I previously posted
    With Range("D" & LRow, "BE" & Lrow)
    should have been
    With Range("D5", "BE" & Lrow)


    This code will format from row 5 to target.row

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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