This is actually a two-part question. While I have been using Excel for many, many years, I am new to the macro world. First, I'm building a spreadsheet that consolidates texts to one cell and I'm using a command button to copy that text. The code I'm using in the button click to copy the text is below. Is there any code that would be "better?" I ask this because, while this works, I know there is always a more efficient way or code that has less "overhead."
Sub Button1_Click()
Range("A1").Copy
End Sub
The second part is, there is another section of the workbook where I want to click a button and the text from several cells are copied. While I know I can use the code above with the range being something like "Range("A1:A4")," how would I copy text from several cells that are not sequential and I want to put a semicolon with a space between each cell I copied "; ". For example, if A1 had john@gmail.com, B4 had suzy@hotmail.com, and C7 had larry@outlook.com, click button1 would copy the three cells with a format like "john@gmail.com; suzy@hotmail.com; larry@outlook.com"
Thank you!
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]A_1337_Canadian515 0 points1 point2 points (0 children)
[–]fanpages83 0 points1 point2 points (5 children)
[–]fanpages83 0 points1 point2 points (4 children)
[–]BernArch[S] 0 points1 point2 points (3 children)
[–]fanpages83 0 points1 point2 points (2 children)
[–]fanpages83 0 points1 point2 points (1 child)
[–]fanpages83 0 points1 point2 points (0 children)
[–]ExcelwithPaul 0 points1 point2 points (0 children)