Selecting cells based on a array

Gixxer Lad

New Member
Joined
Dec 21, 2004
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Good afternoon all,
Nice easy one for you I expect, I am trying to select all the cells in a particular column based on an active range. I am using “Cells(ActiveCell.Row,2).Select” for column B of a single selection but I require the same to work on a range eg. If I select A2:J10 I would like to select B2:B10.

Hope this makes sense, any assistance is appreciated.
Thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi & welcome to MrExcel.
If you selection always includes col B how about
VBA Code:
Intersect(Selection, Range("B:B")).Select
 
Upvote 0
Hi & welcome to MrExcel.
If you selection always includes col B how about
VBA Code:
Intersect(Selection, Range("B:B")).Select
Thank you very much, I will retain this nugget but unfortunately column B may not be included.
Best regards
 
Upvote 0
In that case how about
VBA Code:
Intersect(Selection.EntireRow, Range("B:B")).Select
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

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