Using a button to copy range of cells to another sheet

wberg82

New Member
Joined
Feb 19, 2016
Messages
38
I am having trouble writing a macro that when I hit a certain button it copies the data in a range and then pastes it to another sheet to the next available row.

For example, I have 2 sheets: Load List & Hardware. In the hardware sheet, I have button that when I click on it, I want it to copy range B5:E5 and then paste it to the Load List sheet to the next available row starting at C11.

I will have multiple buttons that copy different ranges and paste them to the next available row in the Load List sheet.
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,264
Office Version
  1. 365
Platform
  1. Windows
How about
Code:
Sub wberg82()
   Range("B5:E5").Copy Sheets("Load List").Range("C" & Rows.count).End(xlUp).Offset(1)
End Sub
 

wberg82

New Member
Joined
Feb 19, 2016
Messages
38
WOW that was easy! :). However, it copies the button as well, which I don't want. Any it copies the formatting, which I also don't want. I just want it to copy the text.

I am guessing for every button I create, I need to create a script for the range I want it to copy?

Thanks
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,264
Office Version
  1. 365
Platform
  1. Windows
How about
Code:
Sub wberg82()
   Sheets("Load List").Range("C" & Rows.count).End(xlUp).Offset(1).Resize(, 4).Value = Range("B5:E5").Value
End Sub

I am guessing for every button I create, I need to create a script for the range I want it to copy?
Without knowing anything about your data, or what you are trying to do,then probably.
 

Watch MrExcel Video

Forum statistics

Threads
1,108,924
Messages
5,525,657
Members
409,658
Latest member
Yardcell

This Week's Hot Topics

Top