Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Arrow keys move screen instead of moving from cell to cell | Excel Discussion (Misc queries) | |||
How do I move the current cell to the top of the screen? | Excel Discussion (Misc queries) | |||
Create Macro - move selected rows to new spread sheet | Excel Programming | |||
Macro to move selected cell contents to a specific column on same row | Excel Programming | |||
Move Cell to Top/Left Position on Screen | Excel Programming |