VBA - Selecting multiple cells using ActiveCell.Offset?

jst3712

New Member
Joined
Apr 15, 2010
Messages
10
Hi.
ActiveCell.Offset(0,2).Select would be used to move the active cell 2 cells to the right. Instead of moving it 2 cells to the right, how do I make it so that it highlights/selects the original active cell as well as the 2 cells to the right (so I will then have 3 cells selected). How do I do this?
Normally I would use Range("A1:A3").Select as an example, but what if the cell range reference is unknown and can only go by the "active cell" reference?

Been searching for an answer for about 30 minutes to no avail, so giving this a go :) It's probably really easy too, but for the life of me I cannot get this to happen.

Thanks in advance.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Instead of using Offset use Resize.
Code:
ActiveCell.Resize(,3).Select

PS If you need to you can combine them.
 
Upvote 0
Any solution friends?
Would the Select Visible Cells button be helpful for this? I usually customize the buttons in toolbar/ribbons. Try adding this button and simply record a macro using this function and then edit your code again to insert the select visible cells function from the recording. Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,215,161
Messages
6,123,375
Members
449,098
Latest member
Jabe

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top