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.
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

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!
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,919
Messages
5,514,155
Members
408,987
Latest member
granzowd

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top