Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,557 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,905 people online right now. Registration is fast and FREE... Join Now!




Macro in Excel 2007

 
Reply to this topicStart new topic

Macro in Excel 2007, How to move right

GoldwingerTX
10 May, 2008 - 08:20 AM
Post #1

New D.I.C Head
*

Joined: 10 May, 2008
Posts: 1

I am using a worksheet that is thirteen column wide.
I post Payment made in column "A", ending balance is in column “J”.
I need to know balance in column "J" of same row the last posting was made.
How can I get this balance?
This macro I wrote will do it, but there must be a better way.
I can use this code to move down:
ActiveWindow.SmallScroll Down:=7

But how can I move right or left a number of cells?
This will move all the way to right:
Selection.End(xlToRight).Select

Macro that I use now:
Sub NBal()
'
' NBal Macro
'
' Keyboard Shortcut: Ctrl+Shift+T
'
Range("A20").Select
Selection.End(xlDown).Select
Selection.Copy
Range("L12").Select
ActiveSheet.Paste Link:=True
Range("A20").Select
Selection.End(xlDown).Select

Application.CutCopyMode = False
Selection.Copy
Range("L14").Select
ActiveSheet.Paste Link:=True
Application.CutCopyMode = False
Range("A20").Select
End Sub

Thanks in advance

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:22PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month