Relative/absolute macro

  • Thread starter Thread starter Jim Orson
  • Start date Start date
J

Jim Orson

I am trying to write a macro. I need to select a range in the macro. There
are 6 columns and 10 rows with numbers in them in the worksheet from A1 to
F10. Cell F10 is always the end of the selection. The start of the
selection could be A1, A2, A3...or up to A10 depending on where the cursor
is when the macro is run. So the selected range could be A1:F10, A2:F10,
A3:F10...or up to A10:F10 depending on where the cursor is when the macro is
run.

Can someone help me with the code for this macro for this selection?
Neither relative nor absolute references work the way it should. Thanks.

Jim Orson...
 
Do you mean this Jim

Sub test()
Range(Cells(ActiveCell.Row, 1), Cells(10, 6)).Select
End Sub
 
Ron,
Exactly what I needed. I used it to complete the rest of the macro. Thank
you!
Jim Orson...
 

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