range shift

G

greg

Hello,
I have a strange question.

I have a sheet. call it test1
I have a range of a table. lets say B4 to G20. named "MyTable"
I have a range in the column C named "myCcolumn"

If I do this

Set TempRange = Worksheets("test1").Range("MyCColumn")
level_number = TempRange.Column

then level_number = 3. because its C


If I loop rows through the table. If I want to read the level_number
column, I will be off.
Because I am getting the column based on the sheet. not based on the table.

I tried to get the column number like this

Worksheets("test1").range("MyTable").Range("MyCColumn")
but excel does not like this.

Is there a way to get the column based on the MyTable area?

thank for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top