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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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
 

AlexL2

New Member
Joined
Jul 14, 2010
Messages
12
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
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
All that selecting isn't necessary. What are you actually trying to do?
 

AlexL2

New Member
Joined
Jul 14, 2010
Messages
12

ADVERTISEMENT

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>
 

AlexL2

New Member
Joined
Jul 14, 2010
Messages
12

ADVERTISEMENT

That worked, but I then need it to paste into the next row, it is still pasting it into cell A4.
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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
 

AlexL2

New Member
Joined
Jul 14, 2010
Messages
12
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!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,925
Messages
5,834,392
Members
430,282
Latest member
MeredithD26

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
Top