Posts by Badpower

    Re: Reference Last Cell In Column

    Quote from Barrie Davidson;303913
    Range("H65536").End (xlUp)

    will give you the last cell in column H, change the reference accordingly.

    Hope this helps you out.

    For Excel 2010, last cell is not 65536 so to make sure your code runs well on any Excel version I'd go with:

    Sheets(1).Cells(Sheets(1).Cells.Rows.Count, "B").End(xlUp).Row

    [INDENT]Where 1 specifies Sheet index (and can be replaced by Sheet name enclosed in double quotes) and "B" specifies the Column you intend to find last used cell.[/INDENT]