Offset Range Naming

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying (very) to create some code that will create a range name starting
at cell B10, down to the final row with data in that column. I have a
starting point of

Finalrow = Range("F65536").End(xlUp).Row

Which uses column F to find the final row with data. I would like
assistance with the next line(s) of code to create a range called AssignedTo

Thanks in Advance for your help
 
Richard,

I'm not completely certain what you want so belwo are 3 different ranges:-

Sub versive()


finalrow = Range("F65536").End(xlUp).Row
Set AssignedTo = Range("B10:F" & finalrow)


finalrow = Range("B65536").End(xlUp).Row
Set AssignedTo1 = Range("B10:B" & finalrow)
AssignedTo1.Select

finalrow = Range("B65536").End(xlUp).Row
Set AssignedTo2 = Range("B10:B" & finalrow).Offset(1, 1)' alter the offset
to suit
AssignedTo2.Select

End Sub

Mike
 
Mike thanks

As you have probably guessed, like most on this site I am new to the VBA
side and haven't quite got my head around it yet.

The version of your code that works for me is

finalrow = Range("F65536").End(xlUp).Row
Set AssignedTo = Range("B10:B" & finalrow)
AssignedTo.Select

Many Thanks
You have saved my sanity
 

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

Back
Top