Wednesday, June 26, 2019

worksheet function - Use a button to send info from one excel sheet to another




I've got an excel spreadsheet that will collect data in the rows. I want to create a button that would send the cells from B3:I3 to a second sheet in the same workbook. After sending the data, the information from the first sheet should be deleted automatically.



I have the button created and the spreadsheet setup, but I have not used VBA in excel before and I'm having difficulty finding code to piece together to finish this sheet.



Can anyone provide some direction or help?


Answer



Try this:



Sheets("Sheet2").Range("B3:I3").Value = Sheets("Sheet1").Range("B3:I3").Value
Sheets("Sheet1").Range("B3:I3").Clear


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...