Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2004

Tip: Looking for answers? Try searching our database.

look ups

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tom donino - 10 Feb 2004 13:29 GMT
I am trying to write code to program a button to look up
a stock symbol in column A on another sheet and write the
information on that row onto the next available row on
the master sheet. any thoughts?
Bob Phillips - 10 Feb 2004 14:10 GMT
Tom,

Here's a thought

Dim oFind As Range

   Set oFind = Worksheets("Sheet2").Columns(1).Find("abcd")
   If Not oFind Is Nothing Then
       oFind.EntireRow.Copy Destination:=Cells(Rows.Count,
"A").End(xlUp)(2, 1)
   End If

Signature

HTH

Bob Phillips
   ... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

> I am trying to write code to program a button to look up
> a stock symbol in column A on another sheet and write the
> information on that row onto the next available row on
> the master sheet. any thoughts?
Tom Ogilvy - 10 Feb 2004 14:15 GMT
Dim sStockSymbol as String
Dim rng as Range, rng1 as Range
sStockSymbol = "ABCD"
set rng = worksheets("Data").Columns(1).Find( What:=sStockSymbol)
if not rng is nothing then
set rng1 = Worksheets("Master") _
 .Cells(rows.count,1).End(xlup).Offset(1,0)
rng1.entireRow.copy destination:=rng1
End if

Signature

Regards,
Tom Ogilvy

> I am trying to write code to program a button to look up
> a stock symbol in column A on another sheet and write the
> information on that row onto the next available row on
> the master sheet. any thoughts?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.