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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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