• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Select from fixed cell to used range

Hi Friends,

I am very simple query, but i am not able to find out how to do it.

In the attached file, i want to select the range from cell B8 (which is fixed), to used range i.e. till Cell F18 (but the problem is, cell F18 is not fixed). Last used row or column can change.

Thanks & Regards,
Manish
 

Attachments

  • Select Range.xlsm
    14.9 KB · Views: 2
We can use the SpecialCells object to get what you want.
Code:
Sub select_range()
With ActiveSheet
    .Range("B8", .Cells.SpecialCells(xlCellTypeLastCell)).Select
End With

End Sub
 
We can use the SpecialCells object to get what you want.
Code:
Sub select_range()
With ActiveSheet
    .Range("B8", .Cells.SpecialCells(xlCellTypeLastCell)).Select
End With

End Sub

Thanks a lot Luke M for the quick response with solution.
My problem is solved

I was not aware of SpecialCells object, if you dont mind then can you please tell me something about these special cells or if you can give me some weblink from where i can refer more info about it.

Thanks Luke.
 
Back
Top