Search and move??

R

Robert M. Gary

I would like to create a macro that reads a value from a cell, switches
sheets, finds the cell value in the new sheet, then repositions the
window (scrolls) so you can see the entry (so its no below the screen).

I know I can select the value from the original cell by

Range("C3").Select
Selection.Copy
Sheets("Report").Select

but how to I actually do the find() and then bring the found value up
to the top of the screen?

Thanks so much in advance. I'm a Java programmer and still trying to
figure out VB. I'm looking for something like "javadocs".

-Robert
 
D

Don Guillett

this should work
Sub gotovalue()
x = ActiveCelly = Sheets("sheet5").Cells.Find(x).Address
Application.Goto Sheets("sheet5").Range(y), Scroll:=True

End Sub
 
D

Don Guillett

corrected word wrap

Sub gotovalue()
x = ActiveCell
y = Sheets("sheet5").Cells.Find(x).Address
Application.Goto Sheets("sheet5").Range(y), Scroll:=True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top