LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Macro to move one cell down

OK

Sub MoveDown()
Static RowNo As Integer
If RowNo = 0 Then RowNo = 1
Cells(RowNo, 1).Select
RowNo = RowNo + 1
End Sub

Copy this into a module in the VBA window. Each time it is run, the active
cell will move down one row, starting in A1.

If this does what you want, remove the first and last lines, and place the
code into your own macro.

Hope this works.

Regards - Dave.

"tjb" wrote:

I think this may be getting too complicated so maybe I can make this even
simpler. All I really need is the line of code that moves the active cell
from A1 to A2, then A2 to A3, A3 to A4 and so on. Thanks for your patience
on this, I really appreciate it!

"Dave" wrote:

Hi,
I didn't check the rest of your code. I assumed it was working all except
for the moving to a new cell thing.
XL's copy/paste action doesn't care about the contents of a cell, whether
text or integer, or anything else.
When you select Range ("A8") from the Extract.xls workbook, there is no
worksheet specified. Does that workbook only have one sheet?
What actually happens when you run the macro?
Dave.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to move part of cell contents to another cell icetoad hisself Excel Discussion (Misc queries) 4 November 27th 06 07:19 PM
Visual basic macro move cursor down 1 cell Roger Excel Worksheet Functions 1 September 12th 06 08:09 PM
macro- move down to empty cell & active worksheet EducatingMom Excel Worksheet Functions 3 August 4th 06 11:02 PM
move to another cell within a subtotal report within a macro NoelH Excel Worksheet Functions 1 August 31st 05 03:02 PM
enter data in cell which will start macro to move data to sheet2 Tommy Excel Discussion (Misc queries) 0 May 12th 05 05:00 PM


All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"