ActiveCell

Dysprositos

Board Regular
Joined
Aug 3, 2002
Messages
92
Hi

How can i select the cells B:J,M:N,T in the active row?

So far i have
ActiveCell.Offset(0, -12).Activate

this selects the B cell in the active row. How can i select more than one cell?

Should i explain more, this seems pretty confusing...


cheers
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Something like this would work:

<pre>
Public Sub main()

Dim iRow As Long
Dim sSelections As String

iRow = ActiveCell.Row
sSelections = "B" & iRow & ":J" & iRow & ",M" & iRow & ":N" & iRow & ",T" & iRow
ActiveSheet.Range(sSelections).Select

End Sub</pre>
 
Upvote 0
Thats awesome! Thanks

Its times like these that make me want to enrol in some kind of visual basic tafe course or something.

Cheers
 
Upvote 0
A library card is a cheaper investment. :biggrin: Flick through as many VBA books as they have. You don't need to read the whole book, just look for the interesting bits.
 
Upvote 0

Forum statistics

Threads
1,214,394
Messages
6,119,263
Members
448,881
Latest member
Faxgirl

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