View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Selecting ranges with Cells()

Hi Robotman,


Try:

Set Rng = Range("A1").Resize(1,5)


---
Regards,
Norman




"robotman" wrote in message
ups.com...
Can someone tell me how to specify a range with the Cells command?

On the spreadsheet level, you can use OFFSET to not only specify the
offset cell starting point, but also how many cells across and down
you'd like to reference. (i.e. "=OFFSET(A1,0,0,1,5)")

In VBA, the Offset only seems to let you specify the offset cell.

I'd like to be able to specify a range with a single Cells command
like:

Cells(1,1).Offset(0,0,1,5).Select ' Select A1:E1

What syntax would I use to designate a range using Cells?

Thanks!

John