+ Reply to Thread
Results 1 to 6 of 6

Moving to first empty cell on page

  1. #1
    Registered User
    Join Date
    01-22-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    9

    Moving to first empty cell on page

    Hello,
    I am using hyperlinks to navigate through a wookbook.
    Problem is that the hyperlink dumps you at cell A1.
    I want it to open up the page and then search down for first available empty cell in coloumn A.

    As data is added this cell will always be different.
    I think I need some VBA code but don't know how ??

    Can anyone help ??

    Thanks
    Steeley
    Last edited by steeley7; 01-22-2009 at 06:45 PM.

  2. #2
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421
    Try this macro....you can tag it to a button.

    Please Login or Register  to view this content.


    If it works for you, please mark the post as [SOLVED] and feel free to click on the blue scales to add to my reputation =)

    GuruWannaB

  3. #3
    Registered User
    Join Date
    01-22-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    9
    Yep it does the trick...
    But it gets rid of row and coloumn headers that I need on the sheet.
    Also is there a way to run this as soon as I click on the sheet.

    Thanks
    Steeley

  4. #4
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421
    Sorry....remove the


    Please Login or Register  to view this content.
    From the code...that is what is turning it off

    To automate the macro for when the sheet is open...right click on the sheet tab, click on View Code and paste the macro below in there. Make sure the left box at the top is selected as WORKSHEET and the right one is marked as ACTIVATE

    Please Login or Register  to view this content.
    Last edited by GuruWannaB; 01-22-2009 at 04:32 PM. Reason: Keeps cutting my directions off

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    heres a trick i noted down a while ago
    name a range, doesnt matter what ,just click a cell then define it,
    insert hyperlink to named location in file check the defined name and click it
    select the name you just created click ok
    then...
    go to insert names
    click the name you defined
    replace the cell reference there with
    =OFFSET($A$1,MATCH("*",$A:$A,-1),0)
    click ok
    the link will now always jump to end of col A (if any intermediate cells are blank it will pass them unless they are not trulu blank but a space it will stop there)
    you can change that to another sheet if you want
    =OFFSET(sheet2!$A$1,MATCH("*",sheet2!$A:$A,-1),0)
    if col contains numbers only use
    =OFFSET(sheet2!$A$1,MATCH(99^99,Sheet1!$A:$A,1),0) instead
    Last edited by martindwilson; 01-22-2009 at 05:06 PM.

  6. #6
    Registered User
    Join Date
    01-22-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    9
    Thanks GuruWannaB...

    excellent just the trick...
    thanks for your help.

    Sorry martindwilson you lost me somewhere on that one... I have another look at it but the one above works well at the moment.

    Cheers anyway.

    Steeley7

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1