Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to Move Selected Cell to Top of Screen


Once you have detemined the cell that contains the data your looking
for, I found the following

Application.Goto Reference:=Worksheets("Sheet1").Range("B15"),
Scroll:=True,

The only problem with this is that it scrolls down and also to the
right.


I have used cell B15 as the target cell in the above script,

what I think then needs to be done is that if the data you want is in
cell B15, you need to tell the code to scroll to A15 not B15, then it
wont scroll to the right.

so the final code would be

Application.Goto Reference:=Worksheets("Sheet1").Range("A15"),
Scroll:=True


.................................................. ...



Thought about this for five mins.........

What you could do is............Copy the contents of the cells in the
middle of the screen to a new inserted hidden column in "A" possition
in the worksheet.

Then use your search to look for the data in that column not in the
column in the middle of the page, then use the GOTO reference command
above to scroll down to that line......your code will find data in a
hidden column. This way you could use

Application.Goto Reference:=Worksheets("Sheet1").Range("A15"),
Scroll:=True

to goto you desired line.


I think this might work.....I'm no professional....but I think it may
work....it worked on a test file I created.


Celtic_Avenger


--
Celtic_Avenger
------------------------------------------------------------------------
Celtic_Avenger's Profile: http://www.excelforum.com/member.php...o&userid=14101
View this thread: http://www.excelforum.com/showthread...hreadid=273904

Reply
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
Arrow keys move screen instead of moving from cell to cell LuisGe Excel Discussion (Misc queries) 3 May 22nd 09 11:17 PM
How do I move the current cell to the top of the screen? mad.cow Excel Discussion (Misc queries) 6 May 29th 05 05:35 AM
Create Macro - move selected rows to new spread sheet chrisak Excel Programming 1 May 24th 04 06:55 PM
Macro to move selected cell contents to a specific column on same row Ben Johnson[_3_] Excel Programming 1 February 10th 04 08:43 PM
Move Cell to Top/Left Position on Screen Phil Hageman[_3_] Excel Programming 4 January 10th 04 07:24 PM


All times are GMT +1. The time now is 05:16 AM.

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

About Us

"It's about Microsoft Excel"