Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting rows

Status
Not open for further replies.

Luis939

MIS
Feb 28, 2003
453
US
I want to be able to record the row of my activecell, thats no problem, but now i need to select all the rows between that row and the row of a cell i found before

i tried this

Let cellAdress2 = ActiveCell.Row
Rows("cellAddress1:cellAddress2").Select

'cellAddress1 is the row stored from the first cell I found,
I keep getting a type mismatch error, can anyone help??

After I do this, I'll just copy and paste it onto another file, but i want to paste it starting at row 2, How would I do this without using

Range("A2").Select

thanks!
 
Hi
For the first part of your question you just have the quotes in the wrong places - trust me, easily done!!

Try
Code:
Rows(row1 & ":" & row2).Select

For the second part what are you copying? Assuming the selected rows then

selection.copy destination:=Workbooks("Your book").Worksheets("Your sheet").range("your range")

should do the trick.
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
 
YOUR BEAUTIFUL!!! I keep forgetting that concatenation business, so yes this man is always wrong, but luckily I have you to correct me, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top