Hi,

I have inherited a spreadsheet that will open up a raw data file and import the data after removing unwanted header info. I would like to somehow count the number of lines that have been imported so that I can do some further tweeking. I am guessing this is where I would need to add it.

Here is the code that is doing the copying from the input file:

 Rows("1:1").Select
    Range(Selection, Selection.End(xlDown)).Select
         With Selection.Font
        .Name = "Arial"
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
    Selection.Copy
If it's better to count the lines when pasting then here is the code that does that:
    Rows("5:5").Select
    Selection.Insert Shift:=xlDown
    Rows("4:4").Select
    Selection.Delete Shift:=xlUp
Any help is greatly appreciated.

Thanks