Hi all -
I have the below code to copy a set of row data from one tab and paste/transpose when a Command Button is clicked on a second tab. How do I edit this so that every time the Command Button is clicked, the data is pasted to the right on the first blank row? Currently, when it's clicked a second time it pastes below the already pasted data.
What it does now:
Copied as: aaaaa
Pasted as: a
a
a
a
a
When I click the button again, it copies and pastes as follows:
a
a
a
a
a
a
a
a
a
a
I would like it to perform as follows instead:
aa
aa
aa
aa
aa
Hope that makes sense!
Private Sub CommandButton1_Click()
Sheets("QRR Template").Range("B6:AK1000").Copy
If ActiveSheet.Range("B7") = "" Then
ActiveSheet.Range("B7").PasteSpecial Transpose:=True
Else:
ActiveSheet.Range("B" & Columns.Count).End(xlUp).Offset(1).PasteSpecial Transpose:=True
End If
End Sub
Appreciate any help!
I have the below code to copy a set of row data from one tab and paste/transpose when a Command Button is clicked on a second tab. How do I edit this so that every time the Command Button is clicked, the data is pasted to the right on the first blank row? Currently, when it's clicked a second time it pastes below the already pasted data.
What it does now:
Copied as: aaaaa
Pasted as: a
a
a
a
a
When I click the button again, it copies and pastes as follows:
a
a
a
a
a
a
a
a
a
a
I would like it to perform as follows instead:
aa
aa
aa
aa
aa
Hope that makes sense!
Private Sub CommandButton1_Click()
Sheets("QRR Template").Range("B6:AK1000").Copy
If ActiveSheet.Range("B7") = "" Then
ActiveSheet.Range("B7").PasteSpecial Transpose:=True
Else:
ActiveSheet.Range("B" & Columns.Count).End(xlUp).Offset(1).PasteSpecial Transpose:=True
End If
End Sub
Appreciate any help!