View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
R.VENKATARAMAN R.VENKATARAMAN is offline
external usenet poster
 
Posts: 74
Default Selecting Multiple Cells

try this vba programm("g" is your match)

Public Sub test()
Range("a1").Select

Cells.Find(what:="g").Activate
Dim lastcell As Range
Set lastcell = ActiveCell.Offset(0, 5)
Dim myrange As Range
Set myrange = Range(ActiveCell.Offset(0, 1), lastcell)
myrange.Select

End Sub

Jordan wrote in message
...
When you are in an excel file you can select multiple cells my clicking in
the first cell and then dragging across or down to the last cell, or by
Control + Click. Is there a was for me to pick several cells from inside

a
VBA project. The main problem is that I don't know which cells I want to
select. The program runs though looking for matches to cells in the first
column and then when it finds one it is suppose to select the next 5 cells

in
that row.
Thank you very much for the help,
Jordan