VBA code to Copy data from one sheet to another

CachimJ

New Member
Joined
Apr 13, 2018
Messages
3
I am apologizing in advance for my lack of in depth knowledge of macros and VBA as I am new to this. I am trying to add a command button on one sheet to take the data from multiple cell ranges and copy the data over to another sheet in one horizontal row. The data must be copied to the next empty row and carry down the same table formatting as it adds a new line each time. The code that I am currently using copies some of the data in a new row each time I click the command button and some of the data on the same line repeatedly.

Code:
Sub Submit()

Range("E6:E27").Copy

Sheets("JANUARY").Range("F" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=True

Range("D3").Copy

Sheets("JANUARY").Range("B" & Rows.Count).End(xlUp).Offset(1, 0)PasteSpecial xlPasteValues, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=True
End Sub

Can anyone provide some guidance, tips, suggestions with this?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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