Macro to paste entered data in column to the first empty row

matija385

Board Regular
Joined
Sep 17, 2014
Messages
77
Hi all,

i'm new to excel macros, and need help. I have 2 sheets, Sheet1 & Sheet2. In Sheet1 i have few data that has to be entered in columns
A3 - First name - data entered in B1
A4 - Last name - data entered in B1
A5 - Address - data entered in B1
A6 - Contact - data entered in B1

And in Sheet2 i have those data in row
A1 - Customer code (pre-entered)
B1 - First name
C1 - Last name
D1 - Address
E1 - Contact

I would like to have a macro which would save data from Sheet1 to Sheet2 and to do that to first empty row. In Sheet2 in column A are number is order - like codes for my customers, so for epmty row shoud be condition based on column B.

Hope you understand my question.

I have some code, but it's copying all data in B column I don't know where and how to put in code where it should paste the selected and copied data from Sheet1. Please, have in mind my first sentence, i'm new to Macros in Excel :)

Range("B3").Select
Selection.Copy
Sheets("Sheet2").Select
Range("b" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("B4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("b" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("B5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("b" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("B6").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("b" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Thnx in advance :)
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,091
Latest member
gaurav_7829

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