Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Experts:
Below macro ... (1)... creates a user-defined search dialog box and ... (2)... searches for data records that are listed in a 'xlsheetveryhidden'-worksheet (Sheet name = list)... and (3)... if found, the data record is copied into the active cell of the current worksheet. I would like to have this macro rewritten so that ... .... Excel copies the first instance of a found value/data record right into row 1 of the current worksheet. Subsequent hits should then be copied into row 2, row 3 etc. and so forth no matter which cell is activated. Is this possible? Help is very much appreciated. Thank you very much in advance. Regards, Andreas Sub Find_it_and_copy_it() Dim varWhat Dim rngfound As Range varWhat = Application.InputBox("Enter text to find") Set rngfound = Sheets("list").Cells.Find(what:=varWhat, LookIn:=xlValues, lookat:=xlWhole, MatchCase:=False) If Not rngfound Is Nothing Then rngfound.EntireRow.Copy Cells(ActiveCell.Row, 1) End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete values in sheet 2 that arre found in sheet 1 | Excel Discussion (Misc queries) | |||
lookup single value in one sheet, return multiple results from theother sheet | Excel Worksheet Functions | |||
Search for rows in one sheet and copy into another sheet based on customer id | Excel Worksheet Functions | |||
copy values generated by conditional formula in one sheet to the other work sheet as values | Excel Worksheet Functions | |||
copy values generated by conditional formula in one sheet to the other work sheet as values | Excel Discussion (Misc queries) |