Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I start the search on a sheet named "Search". I enter the ID number that I
want to look up in cell E4. Trying to get a macro button to work. Can't figure out how to locate an ID number on a sheet (named "Data") and if it is found, transfer data in the row the ID number is located to another sheet (named "Final") using the lines below. Sheets("Final").Range("D14").Value = Sheets("Data").Range("B*").Value Sheets("Final").Range("D15").Value = Sheets("Data").Range("C*").Value Sheets("Final").Range("D13").Value = Sheets("Data").Range("E*").Value Sheets("Final").Range("H18").Value = Sheets("Data").Range("G*").Value Sheets("Final").Range("H19").Value = Sheets("Data").Range("H*").Value Sheets("Final").Range("H20").Value = Sheets("Data").Range("I*").Value Sheets("Final").Range("H21").Value = Sheets("Data").Range("J*").Value Sheets("Final").Range("H22").Value = Sheets("Data").Range("K*").Value Sheets("Final").Range("H23").Value = Sheets("Data").Range("L*").Value * = the row in which the ID number you searched is located. If the ID number is not found I would like it to pop up a MsgBox saying for example "No record". Any help would be greatly appreciated. Thank you! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert select button on excel worksheet to auto transfer data. | Excel Worksheet Functions | |||
How can Excel adjust page breaks to specific locations? | Excel Discussion (Misc queries) | |||
when I search for data in Excel, the found cell cannot be seen | Excel Discussion (Misc queries) | |||
InputBox to select cell locations | Excel Worksheet Functions | |||
I need a macro to grab specific data and transfer it to a now worksheet | Excel Programming |