Apply "All Border" in VBA for the row range that is not fixed.

  • Hi all,
    Hope everything is fine.

    Can anyone help me on "How to use All borders" option using VBA. It would be of great help.

    My required cell starts from "A3" cell and Column will end at "Y" column (Column is fixed everytime). But the row number will be varying everytime. Row range might be 450 ,650 or any other number.

    I want to apply border to every cell.

    Font style = Calibri (Its fixed)
    Font size = 11 (Its fixed)
    Alignment = Centered (Horizontal and Vertical as well)

    When I am trying to record Macro and run it, its working only for "A" and "B" column and for the rest of the columns (From "C" till "Y") its not working.

    Attached is the excel for your reference.

    Thanks in advance.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!