Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Nicole Hughes   on Nov 28 In MS Office Category.

  
Question Answered By: Alfonsine Miller   on Nov 28

Let me add 2 more hints...

1) If you have a table with variable  length, and/or width, you can use:
FirstRow = ActiveSheet.UsedRange.Row
FirstCol = ActiveSheet.UsedRange.Column
LastRow = FirstRow + ActiveSheet.UsedRange.Rows.Count - 1
LastCol = FirstCol + ActiveSheet.UsedRange.Columns.Count - 1

LastRow and LastCol sounds complicated, but makes perfect sense in case your
table does NOT start in row "1" and/or column "A". Then it is adjusting the row
and/or column number. You can use this in Pascal's range  very easily, for
example:
myrange = range(cells(FirstRow,6),cells(LastRow,6))

2) If you know the first row and column, you can use:
Range(Cells(2, 2), Cells(2, 4).End(xlDown)).Select
which will select row 3 till the end of your table for columns B, C and D

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Linest Function Or get search suggestion and latest updates.


Tagged: