Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

change active cell in excel

change active cell in excel

change active cell in excel

change active cell in excel; i know I can press Cntrl G and enter the cell to go to. To make it easier, I would like a button which could be clicked and have the spreadsheet automatically move to a different cell
Any ideas would be appreciated

RE: change active cell in excel

Stick the command in a macro, create a button, and assign the macro to the button

This is an example macro that I used for a couple of things

CODE -->

Sub Macro2()

    EndDate = ActiveCell.Value
    Sheets("BP Full Chart").Select
    ActiveChart.Axes(xlCategory).MaximumScale = EndDate + 3

    Sheets("BP Chart").Select
    ActiveChart.Axes(xlCategory).MaximumScale = EndDate + 0.25
    ActiveChart.Axes(xlCategory).MinimumScale = Round(EndDate) - 10
End Sub 

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm

RE: change active cell in excel


There are so many places to go and so little time!

You need to look at Named Ranges. If you have a location in mind, it ought to have been given a name and then by accessing the Name Box, you will be able to select ANY of your Named Ranges.

I would, however, respectfully take exception to IRstuff. I always avoid using Select and Activate with the exception of leaving a Procedure, where you might want the display/activecell to be a specific workbook, worksheet, cell.

Select and Activate are commands that slow down your process. And each DOT level in a statement takes time to process, which is a reason to use With...End With.


Sub Macro2()

'We're not sure what worksheet we are on to get the EndDate. Would be better to identify   
    EndDate = Range("A1000000").End(xlUp).Value

'These worksheets do NOT need to be Activated in order to access their data    
    Sheets("BP Full Chart").Axes(xlCategory).MaximumScale = EndDate + 3

    With Sheets("BP Chart")
        With .Axes(xlCategory)
            .MaximumScale = EndDate + 0.25
            .MinimumScale = Round(EndDate) - 10
        End With
    End With

'I'm assuming that this procedure is located in the workbook that is being saved   
End Sub 


glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: change active cell in excel

I found that I could do what I wanted using Hyperlinks. Thanks

RE: change active cell in excel

Quote (William Heath)

I found that I could do what I wanted using Hyperlinks. Thanks

I was just about to suggest doing that!

Doug Jenkins
Interactive Design Services

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close