LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Search value, if found transfer select data to specific locations.

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert select button on excel worksheet to auto transfer data. Gryndar Excel Worksheet Functions 2 November 23rd 08 10:36 PM
How can Excel adjust page breaks to specific locations? Kara Strong Excel Discussion (Misc queries) 1 September 25th 07 12:21 AM
when I search for data in Excel, the found cell cannot be seen Howard in GR Excel Discussion (Misc queries) 3 July 21st 06 09:51 PM
InputBox to select cell locations Michael M Excel Worksheet Functions 5 February 21st 06 05:18 PM
I need a macro to grab specific data and transfer it to a now worksheet Jason Ward Excel Programming 4 April 28th 05 01:59 PM


All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"