multiple row selecting

  • Thread starter Thread starter climate
  • Start date Start date
C

climate

Hello
On sheet1,column H is numbered 1 to 16000 irregularly. i want to copy
multiple rows entirly to sheet2 when i select number of rows at column H (4
example: 15 ,12600,358,.... ). my prior question locate at 10/11/2008(row
selecting).
Rick respond me with a well macro for only 1 row. at present i need to
multiple row because i have many large matrix.
Would you please guide me?
best regards
 
post the macro you already have to see if somebody can ammend it.
susan
 
Hi Susan
This is macro that Rick send me:
Sub CopyRow()
Dim Answer As String
Dim LastRowOnSheet2 As Long
With Worksheets("Sheet2")
LastRowOnSheet2 = .Cells(.Rows.Count, "A").End(xlUp).Row
If LastRowOnSheet2 = 1 And .Cells(1, "A").Value = "" Then
LastRowOnSheet2 = 0
End If
Answer = InputBox("Find which number in Row H and copy it?")
Worksheets("Sheet1").Columns("H").Find(Answer).EntireRow. _
Copy .Range("A" & (LastRowOnSheet2 + 1))
End With
End Sub
 
hi climate......... i ammended the macro that rick sent you so that it
asks for the row number, not the number to look for in column H. i
don't know how to make it work for multiple rows, but you could redo
it several times.......... sorry i can only get you halfway!
'----------------------------------------
Sub CopyRow()
Dim Answer As String
Dim LastRowOnSheet2 As Long
Dim LAnswer As Long

With Worksheets("Sheet2")
LastRowOnSheet2 = .Cells(.Rows.Count, "A").End(xlUp).Row
If LastRowOnSheet2 = 1 And .Cells(1, "A").Value = "" Then
LastRowOnSheet2 = 0
End If
Answer = InputBox("Find which row number and copy it?")

LAnswer = Answer

Worksheets("Sheet1").Range("A" & LAnswer).EntireRow. _
Copy .Range("A" & (LastRowOnSheet2 + 1))

End With
End Sub
'------------------------------------------------------
good luck!
:)
susan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top