I am developing a macro for auto-filling formulas for 3 cells for which row count can vary. So I want my macro to fill these formulas to all the required rows. Doing a macro recording I am getting a fixed length and I am NOT so good in VBA to play with the code.
Code by recording the macro -
Please advice what changes I need to make the code working
Code by recording the macro -
Range("M2:O2").Select
Selection.AutoFill Destination:=Range("M2:O5598")
In the above code it will fill the to rows from 2 to 5598. I want this 5598 to be actually be row count.Selection.AutoFill Destination:=Range("M2:O5598")
Please advice what changes I need to make the code working