Moving to next row

AlexL2

New Member
Joined
Jul 14, 2010
Messages
12
I am trying to write a macro that will move to the next row and first cell after it copies the information, and then have this happen everytime the macro is run.

If you could help me out I would greatly appreciate it.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Something like this?

Code:
Sub test()
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
Rows(LR).Copy
Rows(LR + 1).Insert
Application.CutCopyMode = False
End Sub
 
Upvote 0
Thanks for the help, but it's not doing exactly what i need. I just need it to move the cursour to the next row so it will copy the designated row.

If it helps this is the macro I have so far...

Sheets("Sheet2").Select
ActiveWindow.SmallScroll Down:=9
Range("B35:I35").Select
Selection.Copy
Sheets("Sheet4").Select
Range("A4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
Rows(LR).Copy
Rows(LR + 1).Insert
Application.CutCopyMode = False

End Sub
 
Upvote 0
All that selecting isn't necessary. What are you actually trying to do?
 
Upvote 0
I am essentially making a submit button, so a person can complete various options in a form and when they have completed it they hit this button. This would then copy the information (so it is permanent and will not change when the form is changed) to a separate worksheet in the correct column labels.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
When it copies I would like the cursor to move to the next row so it can then copy the information for the next submitter. <o:p></o:p>
 
Upvote 0
That worked, but I then need it to paste into the next row, it is still pasting it into cell A4.
 
Upvote 0
Instead of

Code:
Sheets("Sheet4").Select
Range("A4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Code:
Sheets("Sheet4").Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues
 
Upvote 0
Fantastic! Works great!

If I could ask you one more thing I would really appreciate it. I have a spinner form that I would like to get to automatically increase by one everytime the button is hit. Is this possible?

Thank you very much!
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,228
Members
448,951
Latest member
jennlynn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top