Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you create a macro that will lookup a text string within the
spreadsheet, and if true copy that entire row to another spreadsheet within the workbook? --- Message posted from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
see: http://www.rondebruin.nl/copy5.htm -- Regards Frank Kabel Frankfurt, Germany Can you create a macro that will lookup a text string within the spreadsheet, and if true copy that entire row to another spreadsheet within the workbook? --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jenn
The following is some starter code. It uses my Sheet1 (lookup sheet), Sheet2 (Copy sheet). It will place the found row below the last one in the copy sheet. (Presuming row 1 is headers) It does no error checking past the searched item is found Sub findAndMove() Dim sData As String Dim rFindRange As Range Dim lLastRow As Long sData = InputBox("Enter search string") If Worksheets("Sheet1").Cells.Find(sData, , , xlWhole) Is Nothing Then MsgBox "Search string not found", vbOKOnly Exit Sub End If lLastRow = Worksheets("Sheet2").Range("A65536").End(xlUp).Row + 1 Set rFindRange = Worksheets("Sheet1").Cells.Find(sData, , , xlWhole) rFindRange.EntireRow.Copy Destination:=Worksheets("Sheet2").Range("A" & lLastRow) End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "JennF " wrote in message ... Can you create a macro that will lookup a text string within the spreadsheet, and if true copy that entire row to another spreadsheet within the workbook? --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
trouble with lookup in a range of cells. | Excel Worksheet Functions | |||
Having trouble getting MATCH to work with a variable lookup array | Excel Worksheet Functions | |||
trouble with text lookup ... help please | Excel Discussion (Misc queries) | |||
Trouble with hyhens within text when using LOOKUP | New Users to Excel | |||
Macro trouble | Excel Programming |