PDA

View Full Version : find code & select multiple lines



asddsa88
03-07-2010, 07:14 AM
Got a new problem...

I want to create a macro that:

1)searches only in column "A" a specified text that the user inputs via a textbox popup

2)selects all the cells that contain that value

3)expands the selection from the cells to their respective rows (this is simple..)

ideas?

I just figured out point 3:
Activecell.Offset(0, 7).Select

any ideas regarding the first two steps?
thanks in advance!

Bob Phillips
03-07-2010, 08:29 AM
Look at find in VBA help, all is explained there.

mbarron
03-07-2010, 08:37 AM
This will select the cell 7 columns to the rightof the selected cell. Activecell.Offset(0, 7).Select

This would expand the selection from ActiveCell to the cell 7 columns to the right. ActiveCell.Resize(1, 7).Select