Macro Copy and Paste Function

Hemingway254

New Member
Joined
May 31, 2018
Messages
1
Hi all,

I am having trouble using Macro which is my first time using it.

Essentially to keep it simple on 'Sheet 1' I have personal data with grouped data so info can be hidden/ displayed on demand. I have a list of surnames and there personal details listed below but grouped so it remains hidden unless opened.

What I want to achieve is for on 'Sheet 1' I want next to each row a macro button which when clicked will copy and paste the group of cells hidden.

Then on 'Sheet 2' for the info to be pasted below a header title.

I want to do this because I want on 'Sheet 2' to have another macro button to export the data in a PDF document.


I want to do this because it will make it easy to export a range of cells on 'Sheet 2' into a PDF document.

So on 'Sheet 1' I will need a button at the end of a certain row which will copy and paste the info grouped beneath it onto 'Sheet 2'.

I have found codes to do the above however, I am having problems with coding to move the range of cells i want to copy/paste every 30 rows down.

The grouped data i want to copy/paste is every 30 rows down. Next to this row I would want a button that will copy and paste this data onto 'Sheet 2'

Hope it makes sense. Sounds more complicated than it may need to be. Thanks in advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,979
Messages
6,175,757
Members
452,667
Latest member
vanessavalentino83

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