Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

select a range within a bigger range

I need to select a range from A-L but the range on the sheet is A - AQ

So lets say I want to select A1 to L200 or A2 to L2000

Could an Expert provide me with the VBA code to do this please

Thanks
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Range("A1:L200").select

Range("A2:L2000").select
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jagwarman
Jagwarman

ASKER

Option 2 is what I was looking for thanks
sorry Saqib but,

If I want to select from A2 to L500 or A2 to L1000 etc this does not work it always selects from A1.

Can you assist
Range("A1").currentregion.offset(1).resize(-1,12).select
tried that but it did not work.
Try this

Range("A1").currentregion.offset(1).resize(Range("A1").currentregion.rows.count-1,12).select
perfect thanks