ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   multiple row selecting (https://www.excelbanter.com/excel-worksheet-functions/207359-multiple-row-selecting.html)

climate

multiple row selecting
 
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

Susan

multiple row selecting
 
post the macro you already have to see if somebody can ammend it.
susan


On Oct 22, 9:28*am, climate wrote:
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



climate

multiple row selecting
 
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).Ent ireRow. _
Copy .Range("A" & (LastRowOnSheet2 + 1))
End With
End Sub


"Susan" wrote:

post the macro you already have to see if somebody can ammend it.
susan


On Oct 22, 9:28 am, climate wrote:
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




Susan

multiple row selecting
 
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



On Oct 23, 2:07*am, climate wrote:
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).Ent ireRow. _
* * * * * * * * * * Copy .Range("A" & (LastRowOnSheet2 + 1))
* End With
End Sub



"Susan" wrote:
post the macro you already have to see if somebody can ammend it.
susan


On Oct 22, 9:28 am, climate wrote:
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- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 03:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com