0
yoink

Simple Excel Macro help wanted

Recommended Posts

Dead simple, but I can't seem to figure it out.

I'm trying to get an Excel macro to simply press Alt+PgDn 3 times in a row for me based on the position of the active cell so I can fill in some data, hit a shortcut and have it jump to the next set where I can fill in more data....

I'm assuming I need to use the SendKeys expression but can't get it working.

Any VBA folks out there who could help with the code?

Share this post


Link to post
Share on other sites
I'm no VBA expert, but you could use the default Record Macro in Excel to record these keystrokes and then extract the code.

But because Alt+PgDn moves the "one screen", and each screen is a different size, the number of offset cells is different depending on the screen being used.

Perhaps you could use this for a start:

ActiveWindow.LargeScroll ToRight:=3
ActiveCell.Offset(0, 29).Select


Change the "29" to however many cells fits into 3 screen widths for you. Hope it works for you?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

0