Specific row at the top of the screen?

I have been looking in this forum for an answer to help me position a
specific row located by a macro at the top of the screen. Can someone
help?
Thank's ahead
0
rpqcca (67)
3/22/2008 9:27:24 PM
excel 39879 articles. 2 followers. Follow

7 Replies
612 Views

Similar Articles

[PageSpeed] 55

From the Excel Vba help file...

This example moves row ten to the top of the window.
Worksheets("Sheet1").Activate
ActiveWindow.ScrollRow = 10
-- 
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Bobby"
wrote in message 
I have been looking in this forum for an answer to help me position a
specific row located by a macro at the top of the screen. Can someone
help?
Thank's ahead
0
jim.coneXXX (771)
3/22/2008 10:11:33 PM
Try something like this
Dim myOldRange As Range
Dim myNewRange As Range

'
    Set myOldRange = ActiveCell
    Set myNewRange = Range("a100")
    ActiveWindow.SmallScroll Down:=myNewRange.Row - myOldRange.Row
    ActiveWindow.SmallScroll toLeft:=myNewRange.Column - myOldRange.Column

I don't think it does what you want YET, but you can play with it.
-- 
HTH,
Barb Reinhardt



"Bobby" wrote:

> I have been looking in this forum for an answer to help me position a
> specific row located by a macro at the top of the screen. Can someone
> help?
> Thank's ahead
> 
0
3/22/2008 10:13:00 PM
Which "specific" row would you be referring to?

A user-selected row or a row with a particular value?

How would the macro locate the row?

Do you have a macro?  Post the code.

Here is a simple macro that copies a selected row or rows to row 1

Sub copy_row()
    Selection.Copy Destination:= _
            ActiveSheet.Range("A1")
End Sub

No warning, just overwrites.


Gord Dibben  MS Excel MVP

On Sat, 22 Mar 2008 14:27:24 -0700 (PDT), Bobby <rpqcca@gmail.com> wrote:

>I have been looking in this forum for an answer to help me position a
>specific row located by a macro at the top of the screen. Can someone
>help?
>Thank's ahead

0
Gord
3/22/2008 10:20:47 PM
On Mar 22, 6:20=A0pm, Gord Dibben <gorddibbATshawDOTca> wrote:
> Which "specific" row would you be referring to?
>
> A user-selected row or a row with a particular value?
>
> How would the macro locate the row?
>
> Do you have a macro? =A0Post the code.
>
> Here is a simple macro that copies a selected row or rows to row 1
>
> Sub copy_row()
> =A0 =A0 Selection.Copy Destination:=3D _
> =A0 =A0 =A0 =A0 =A0 =A0 ActiveSheet.Range("A1")
> End Sub
>
> No warning, just overwrites.
>
> Gord Dibben =A0MS Excel MVP
>
>
>
> On Sat, 22 Mar 2008 14:27:24 -0700 (PDT), Bobby <rpq...@gmail.com> wrote:
> >I have been looking in this forum for an answer to help me position a
> >specific row located by a macro at the top of the screen. Can someone
> >help?
> >Thank's ahead- Hide quoted text -
>
> - Show quoted text -

Hi Gord!
What I do is I locate the current month in a specific column starting
from the top of the file. Whwn I get a hit I would like to put that
specific row on top. Here is the code:

Range("E:E").Select
mois =3D Split("bidon jan f=E9v mar avr mai jun jul ao=FB sep oct nov d=E9c"=
,
" ")
findvar =3D mois(Month(Date))
With ActiveSheet.Range("E:E") ' SUPER SEARCH...!
    Set c =3D .Find(findvar, LookIn:=3DxlValues)
    If c Is Nothing Then Exit Sub 'Pas trouv=E9!
End With

Range("A" & c.Row & ":" & "A" & c.Row).Select
0
rpqcca (67)
3/22/2008 10:39:03 PM
I think maybe I mis-interpreted your needs.

Do you want that row scrolled to the top as Jim has suggested?

He might have interpreted "position" better than I did.

Otherwise, add this line to your code

 � � Selection.Copy Destination:= _
 � � � � � � ActiveSheet.Range("A1")


Gord

On Sat, 22 Mar 2008 15:39:03 -0700 (PDT), Bobby <rpqcca@gmail.com> wrote:

>Hi Gord!
>What I do is I locate the current month in a specific column starting
>from the top of the file. Whwn I get a hit I would like to put that
>specific row on top. Here is the code:
>
>Range("E:E").Select
>mois = Split("bidon jan f�v mar avr mai jun jul ao� sep oct nov d�c",
>" ")
>findvar = mois(Month(Date))
>With ActiveSheet.Range("E:E") ' SUPER SEARCH...!
>    Set c = .Find(findvar, LookIn:=xlValues)
>    If c Is Nothing Then Exit Sub 'Pas trouv�!
>End With
>
>Range("A" & c.Row & ":" & "A" & c.Row).Select

0
Gord
3/22/2008 11:05:24 PM
On Mar 22, 7:05=A0pm, Gord Dibben <gorddibbATshawDOTca> wrote:
> I think maybe I mis-interpreted your needs.
>
> Do you want that row scrolled to the top as Jim has suggested?
>
> He might have interpreted "position" better than I did.
>
> Otherwise, add this line to your code
>
> =A0=A0 =A0 Selection.Copy Destination:=3D _
> =A0=A0 =A0 =A0 =A0 =A0 =A0 ActiveSheet.Range("A1")
>
> Gord
>
>
>
> On Sat, 22 Mar 2008 15:39:03 -0700 (PDT), Bobby <rpq...@gmail.com> wrote:
> >Hi Gord!
> >What I do is I locate the current month in a specific column starting
> >from the top of the file. Whwn I get a hit I would like to put that
> >specific row on top. Here is the code:
>
> >Range("E:E").Select
> >mois =3D Split("bidon jan f=E9v mar avr mai jun jul ao=FB sep oct nov d=
=E9c",
> >" ")
> >findvar =3D mois(Month(Date))
> >With ActiveSheet.Range("E:E") ' SUPER SEARCH...!
> > =A0 =A0Set c =3D .Find(findvar, LookIn:=3DxlValues)
> > =A0 =A0If c Is Nothing Then Exit Sub 'Pas trouv=E9!
> >End With
>
> >Range("A" & c.Row & ":" & "A" & c.Row).Select- Hide quoted text -
>
> - Show quoted text -

Yes, I want that row scrolled to the top.
Thank's for your time.
0
rpqcca (67)
3/23/2008 2:24:49 AM
Jim's reply shows the code required.

Thanks for the update.

Gord

On Sat, 22 Mar 2008 19:24:49 -0700 (PDT), Bobby <rpqcca@gmail.com> wrote:

>On Mar 22, 7:05�pm, Gord Dibben <gorddibbATshawDOTca> wrote:
>> I think maybe I mis-interpreted your needs.
>>
>> Do you want that row scrolled to the top as Jim has suggested?
>>
>> He might have interpreted "position" better than I did.
>>
>> Otherwise, add this line to your code
>>
>> �� � Selection.Copy Destination:= _
>> �� � � � � � ActiveSheet.Range("A1")
>>
>> Gord
>>
>>
>>
>> On Sat, 22 Mar 2008 15:39:03 -0700 (PDT), Bobby <rpq...@gmail.com> wrote:
>> >Hi Gord!
>> >What I do is I locate the current month in a specific column starting
>> >from the top of the file. Whwn I get a hit I would like to put that
>> >specific row on top. Here is the code:
>>
>> >Range("E:E").Select
>> >mois = Split("bidon jan f�v mar avr mai jun jul ao� sep oct nov d�c",
>> >" ")
>> >findvar = mois(Month(Date))
>> >With ActiveSheet.Range("E:E") ' SUPER SEARCH...!
>> > � �Set c = .Find(findvar, LookIn:=xlValues)
>> > � �If c Is Nothing Then Exit Sub 'Pas trouv�!
>> >End With
>>
>> >Range("A" & c.Row & ":" & "A" & c.Row).Select- Hide quoted text -
>>
>> - Show quoted text -
>
>Yes, I want that row scrolled to the top.
>Thank's for your time.

0
Gord
3/23/2008 3:27:32 AM
Reply:

Similar Artilces:

picking from a specific list in a combo box
I have a form that has a combo box called "contact" that refers to a table called "Contacts". I would like to pick from a list of contacts for a specific client without displaying all of the names in the contacts table, just the ones that match the name of the client on the main form. I've tried joining the ID's in the relationships but it doesn't seem to work for me. Any help appreciated! Thanks Lee -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200802/1 Try to set the controlsource of the combobox to a qu...

Deleting rows to resize workspace
Hi. I'm using a workbook that someone else created from a download. It has 23,600 rows -- yet the vertical scroll bar.. when on the last row.. makes it appear that it's only 10% from the top. In the past I've deleted all of the rows - going down to the full million - and then gone back to A1 and hit "save". Usually that refreshes the space. It's not working. I can delete them. And go to A1 and save - even tried resaving with another name.. but it (Excel) still thinks it's bigger than it is. Any ideas? Usually that technique works. Debra D...

Selecting data between to specific dates in a form
Sorry if this is an easy one but I am new to this area. I have created a query from our SQL database that list all hours booked by eack employee and the date booked, from when we 1st started collectin thi information. I am wanting to create a form that anyone can go into and select a date range so that the can calculate the hours between these dates. Th other problem that I have got is that the date are in number format and not in date. How dan I format this correctly? Regards The first thing to do will be to convert your number field into a real date/time field. To do that: 1. Ope...

E-Mailing a specific page of a report
I have lengthy report that is grouped by Zone ID. I want to e-mail the zone supervisor the pages of this report as an attachment (in a snapshot format) that deal with just their zone. currently we e-mail the whole report and the hunt for their information. The zone supervisor e-mail address is in a table called 'tblZones' I don't want to have to create a report with a corresponding query (if possible) for each zone. I am currently using sendobject to deliver this report. However we are not always notified of supervisor changes and would like to use the e-mail address...

Auto Insert Row When Column Amount Changes
This is a multi-part message in MIME format. ------=_NextPart_000_006A_01C55029.0907BB30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Here is an example of what I am talking about. A B C D=20 1 A B C D=20 2 2 41100 274 584=20 3 2 41100 274 625=20 4 2 41100 274 333=20 5 2 41100 274 102=20 6 2 41100 274 957=20 7 2 41100 274 362=20 8 2 41100 274 651=20 9 2 41100 274 611=20 10 2 41100 284 965=20 11 2 41100 284 336=20 12 2 41100 284 251=20 13 2 41100 284 362...

Hide certain rows
Is there a way to hide certain rows depending on the data that the contain? I am trying to only display data that is between certain dates, (i.e it only displays data from now until 6 months later and so will chang everyday) -- Message posted from http://www.ExcelForum.com Hi You can use Data>AutoFilter Choose Custom in the dropdown and use Greater then and Less then -- Regards Ron de Bruin http://www.rondebruin.nl "master811 >" <<master811.1ba9j8@excelforum-nospam.com> wrote in message news:master811.1ba9j8@excelforum-nospam.com... > Is there a way to hi...

Maintaining rows in a Pivot Table
I have an Income Statement that has account numbers and subtotals. I want to keep the hierarchy/order if possible but it seems when I put the data into a pivot table that it puts everything in numerical order followed by alphabetical. So is there a way for it not to sort my account data? Thanks, Steve You could create a custom list of your account numbers, and base the sort order on that. In a cell on a blank worksheet, type your list, then select it Choose Tools>Options Select the Custom Lists tab Click the Import button, click OK When you create a new pivot table, items should b...

Go Offline Specifications
Hi there! I am trying to find a document referring to different scenarios of working offline and their specifications (bytes transfered, estimated time of synchronization, connection types etc). Can you help me? Propose a Microsoft or external source for this? Thanks in advance. Elena I have not seen any document discussing this. Most offline docs talk about what is needed to do it rather than drill into details. Microsoft always recommends you do your initial Go Offline in outlook while connected to the comapny network. We have found that as long as your remote location has a fast conn...

Removing unused or blank rows and columns
I'm creating a worksheet and want to remove the blank rows and columns that fall outside the used range. How is this done? Mark, you cannot remove them, but you can hide them, select the rows or columns and format row or column and hide -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Mark F" <MarkF@discussions.microsoft.com> wrote in message news:2EA6F99C-5D45-4297-81D8-F35F75F89C60@microsoft.com... > I'm ...

Add totals at end of the report with unknow number of rows with VB
I have a report that I download into Excel each day. The amount of rows vary each day. I want to add to an existing macro code that will add at the end of the report (regardless of how many rows there are), in column the text of "Total" and then add the sum of column B (currency) and place that total in column B on the same row as Total. On the next row I would like to add the text "Items" in column A and then have the count display in Column B. I just don't know the code to show this because of not being able to designate what row it will display on. I coul...

Lookup or Match with rows and column together
i would like to look up a value from worksheet2 based on cells matching the row and column from worksheet1 together...example below worksheet 1 COLUMM ROW.. MILK VEGETABLES FRUITS MEATS salesperson1 ?? ?? ?? ?? salesperson2 ?? ?? ?? ?? salesperson3 ?? ?? ?? ?? salesperson4 ?? ?? ?? ...

sending mails to specific mail addresses rather than specific doma
I want to set up exchange in my organization.But in my organization security is very important.I want to restrict users from sending mails only to specific mail address. for example john@yahoo.com but john should not be able to send mails to any one else on the yahoo like sam@yahoo.com. I studied a lot about smtp connectors. but not able to find a solution for this in exchange 2003. Is it possible by any means. Can anyone help me abt this even if microsoft also.Otherwise I am not able to set up exchange server in my organization. Thanks in advance On Tue, 16 Jan 2007 18:43:01 -0800, mang...

Set specific template in Outlook
Hi, Is there any way via C# or vbs i can set witch template outlook uses when the user starts his Outlook, and just general settings, its a pain in the *** to do it manually on 100+ machines.... Or how do you do this, I would love to hear other ways to manage this... kind regards Maybe, if you define wht you mean by "template Outlook uses when the user starts his Outlook." -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "news.microsof...

conditionally hide/unhide rows
Hello all, New to the group and was looking for some formatting help. I have a rather extensive financial model that covers approximately 400-500 rows on the inputs sheet. I'd like to set up a separate input that will consolidate unused rows / columns. For example, the model enables a user to input up to 5 types of capital investment, if a specific user only has 1 type I'd like them to be able to type "1" in an input cell and the required number of rows automatically appear. This way, they are not staring at 300-400 rows that they are now even using. I'm a fairly...

IS there a way to invert rows?
I need to completely flip an address data record. Sorting does not work because it only works by ascending or descending by fields. Is there some way of flipping rows? On Jan 15, 10:32=A0am, karenb <kar...@discussions.microsoft.com> wrote: > I need to completely flip an address data record. =A0Sorting does not wor= k > because it only works by ascending or descending by fields. =A0Is there s= ome > way of flipping rows? Add a column and put number from 1 to ... Then sort that column as you need. Records are across a row? Enter 1 through x across a helper...

Adding a row to a table (again)
There has to be a way to extend an array in Excel and have all of the references update correctly. I have a spreadsheet for tracking mileage on my car. The heart of the spreadsheet is an array (table) of mileage readings at irregular intervals. Here is some sample data showing row and column numbers. B C D E Date Odom Miles Days 17 6/13/05 51,114 2,956 (=C17-C16) 294 (=B17-B16) 18 6/14/05 51,132 18 (=C18-C17) 1 (=B18-B17) 19 3/23/06 54,169 3,037 (=C19-C18) 282 (=B19-B18) 20 3/12/07 58,255 4,086 (=C20-C19) 354 (=B20-...

Rename rows/ in an Excel Spreadsheet
Can I rename the rows/columns in my Excel Spreadsheet so that when I scroll across or down in a large table I can still see my headings? ramacano wrote: || Can I rename the rows/columns in my Excel Spreadsheet so that when I || scroll across or down in a large table I can still see my headings? Go to Window-Freeze Panes -- Interim Systems and Management Accounting Gordon Burgess-Parker Director www.gbpcomputing.co.uk Hi, No you can't rename them, but you can click in cell A2 and choose window / freeze panes to keep row 1 displayed when you scroll down (to remove this, choose w...

import specifications
In ACCESS office 2003, i could change the import specs lusing the advanced button. i can't figure out how to edit an existing speps in ACCESS 2007 without creating a new spec. The only thing I can change is the name and the path. ...

Row totals?
Hi, This seems like it's probably real easy but I am struggling. I have a report with a dozen or more columns, the first few are text and date data but the last 5 are numeric and I'd like to put a total at the end of each row. What's the best way to do this in RS? Can I create a formula in a calculated cell or should I do it in the initial dataset query? SQL 2005 Thanks in advance, Linn Update... I created a new column and just simply added the fields of interest and that seems to be working. If there is a more elegant solution I'm all ears. N...

AutoFilter Blank Rows
After performing an AutoFilter in Excel 2002, I end up with thousands of blank rows when I copy the filtered info to a new worksheet? Anyone else experience this? It makes the filtered file huge, when it should be smaller than the original! Any ideas on how to alleviate this? Hi try using Ron's addin: http://www.rondebruin.nl/easyfilter.htm -- Regards Frank Kabel Frankfurt, Germany "MeliDe" <MeliDe@discussions.microsoft.com> schrieb im Newsbeitrag news:FF625176-4E15-4C15-B03D-8C84AB362A59@microsoft.com... > After performing an AutoFilter in Excel 2002, I end up wit...

Account List by a Specific City, ST ZIP
I am planning a sales trip to Honolulu, HI and I want to prepare an account list for the accounts in that area. In cell A is the store name; cell B is the address; D, is the City; E, is the ST & in cell F is the Zip. How would I be able to create a specific list out of my general list for accounts in Honolulu, HI. I think the zip codes would be difficult because there would be several in Honolulu. Thanks in advance. Victor maybe data>filter>autofilter -- Don Guillett SalesAid Software donaldb@281.com "la90292" <la90292@yahoo.com> wrote in message news:3Q...

How to filter rows with commom N�'s in any column
Hello, How is it posible to filter the common N� that may appear in an coloumn Examlpe: A B C D E F 2 6 8 10 15 20 1 2 5 16 25 30 4 8 12 19 45 48 2 4 15 20 25 28 6 9 19 29 39 49 8 19 25 28 41 45 In this example I want to filter all the rows that have the commo N�8 The filtered Result Should be shown as below: A B C D E F 2 6 8 10 15 20 4 8 12 19 45 48 8 19 25 28 41 45 Thank You Moti -- Message posted from http://www.ExcelForum.com Add a new column to the table, and...

help with full screen mode in Word07
I'm taking a night school course to get a higher degree. In class today, the school had upgraded the computer in the classroom to Word 2007. I had been asked to help scroll a document on the screen while the teacher was talking as she showed us various mistakes past students had made on papers. The problem was that not everything she wanted on screen was page- alligned. In Word 2003 this wasn't a problem, as it defaulted to something similar to the mode you had it in. Not so in Word 2007. Instead, it acted more like the more recent versions of Adobe Acrobat Reader (> 4) and...

Selecting only specific rows for a Sort
We have meetings of 5 different Groups which monitor the incomplete actions on the database that I have set up in excel. Periodically I need to print out lists, individual to each Group's Committee, to report which actions have not been completed. I am going to create a macro so that I can hide/reveal columns that I don't/do want and then I want, as I record the macro, to be able to select just certain dates (ie certain rows) in order to produce the report for the NEXT meeting. so I will need the date from after the previous meeting and up to the day before the next due m...

Code to hide window elements in a specific file
Hi there, I have the following code which works to remove toolbars when a specific file is opened. But I would also like for the formula bar, status bar and sheet tabs to be hidden when the file is opened. These must, however, all be visible again when any other file is opened. Please help! Code in This Workbook: Private Sub Workbook_Activate() Dim bar As CommandBar For Each bar In Application.CommandBars bar.Enabled = False Next End Sub Private Sub Workbook_Deactivate() Dim bar As CommandBar For Each bar In Application.CommandBars bar.Enabled = True Next...