Hi all,

I have code that fills in the blanks(with a 0) in a column om my sheet.The only problem is that when it gets to the end of my sheet it continues filling in the blank after my sheet has ended usually stop at around 300900 lines.So this slows thing up.
Is there a way I could get it to recognise the end of my file and stop filling in the blanks from there.

Columns("I:I").Select
    Selection.Delete Shift:=xlToLeft
    Selection.Delete Shift:=xlToLeft
    Columns("I:I").Select
    Selection.Replace What:="", Replacement:="0", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
any help appreciated
Kind regards
BOF