Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a Range Of Cells.
Can I select a range of cells programatically without knowing exactly which
ones they are? I have a sheet that has a variable number of rows and columns, my code searches all cells for a certain condition, and when the condition is met, it needs to select that cell, and the next 8 cells in the same row in order to copy and paste them somewhere else. I've tried to use the line: (and various derivatives) Selection.Offset(0, 8).Select But this doesn't work. Can anyone tell me what I'm doing wrong? Thanks Neil |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a Range Of Cells.
Try
Selection.Resize(1,8).Select -- HTH RP (remove nothere from the email address if mailing direct) "Neil" wrote in message ... Can I select a range of cells programatically without knowing exactly which ones they are? I have a sheet that has a variable number of rows and columns, my code searches all cells for a certain condition, and when the condition is met, it needs to select that cell, and the next 8 cells in the same row in order to copy and paste them somewhere else. I've tried to use the line: (and various derivatives) Selection.Offset(0, 8).Select But this doesn't work. Can anyone tell me what I'm doing wrong? Thanks Neil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting a range of cells, how to ? | Excel Worksheet Functions | |||
Range selecting cells | Excel Discussion (Misc queries) | |||
Help with selecting a range of cells | Excel Programming | |||
Selecting a Range of cells in VBA | Excel Programming | |||
Selecting a range of cells | Excel Programming |