Macro for copy and paste from one sheet to another on different rows

Fergjosh97

New Member
Joined
Dec 9, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello! I'm still a beginner on so let me know if i'm not clear enough.
I need to copy from Sheet 1 and paste on Sheet 2 in a automatic way, so when I click on a button on Sheet 1 it pastes on Sheet 2.
The data comes from 4 Drop-down lists with multiple cells on sheet 1. I learned how to do it, but know i need that every new entry i select on the drop down lists goes to different rows on sheet 2, so when i'm finished copying and pasting the data from the drop-down menus, i'll have a list on sheet 2 with all the data, in different rows, and not to be replaced on the first row everytime i run the macro. how can i proceed?
thanks in advance
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi Fergjosh97,

if you have recorded a macro or written some code on your own what about posting it? Or maybe pass information on what cells to copy to which columns on the other sheet.

Assuming you have headers on row 1 on the target sheet maybe this code can point into the direction to take:

VBA Code:
Dim lngWrite As Long      'will deliver next row to be filled

With Sheets("Target")
  lngWrite = .Range("A" & .Rows.Count).End(xlUp).Row + 1
  .Cells(lngWrite, "A").Value = Sheets("Data").Range("A1").Value
End With

Ciao,
Holger
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,603
Members
452,658
Latest member
GStorm

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