A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro Code



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 01:43 PM posted to microsoft.public.excel.misc
cvgairport
external usenet poster
 
Posts: 31
Default Macro Code

You'd think this would be simple...

How do I get a macro to move down 1 cell? I just want a macro to copy the
contents of one cell to the cell below it.

I have already done this:

Sub CopyDown()
'
' CopyDown Macro
'
' Keyboard Shortcut: Ctrl+d
'
Selection.Copy
Range("A122").Select
ActiveSheet.Paste
End Sub

I want the A122 to be the cell below where the cursor happens to be when I
kick off the macro.

Any help would be appreciated.

Amy
  #2  
Old April 20th, 2010, 01:46 PM posted to microsoft.public.excel.misc
cvgairport
external usenet poster
 
Posts: 31
Default Macro Code

Got it from the last thread... thanks!

"cvgairport" wrote:

You'd think this would be simple...

How do I get a macro to move down 1 cell? I just want a macro to copy the
contents of one cell to the cell below it.

I have already done this:

Sub CopyDown()
'
' CopyDown Macro
'
' Keyboard Shortcut: Ctrl+d
'
Selection.Copy
Range("A122").Select
ActiveSheet.Paste
End Sub

I want the A122 to be the cell below where the cursor happens to be when I
kick off the macro.

Any help would be appreciated.

Amy

  #3  
Old April 20th, 2010, 01:49 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Macro Code

Hi,

2 ways

ActiveCell.Copy Destination:=ActiveCell.Offset(1)

or

ActiveCell.Offset(1) = ActiveCell.Value
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"cvgairport" wrote:

You'd think this would be simple...

How do I get a macro to move down 1 cell? I just want a macro to copy the
contents of one cell to the cell below it.

I have already done this:

Sub CopyDown()
'
' CopyDown Macro
'
' Keyboard Shortcut: Ctrl+d
'
Selection.Copy
Range("A122").Select
ActiveSheet.Paste
End Sub

I want the A122 to be the cell below where the cursor happens to be when I
kick off the macro.

Any help would be appreciated.

Amy

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.