MurraySMTH
Board Regular
- Joined
- Jun 30, 2020
- Messages
- 81
- Office Version
- 2016
- Platform
- Windows
Hello all,
I am stuck with a VBA error when I am attempting to use the concatenate formula in sheet one to then paste in A2 of another sheet. (Also using Lastrow as Long)
Can anyone review, I am getting no errors, but my data is not pasting to the second sheet.
Sub Concatenate()
Dim String1 As String
Dim String2 As String
Dim String3 As String
Dim String4 As String
Dim String5 As String
Dim full_string As String
Dim Lastrow As Long
Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("Sheet1").Select
String1 = Range("AV2" & Lastrow).Select
String2 = Range("D2" & Lastrow).Select
String3 = Range("AW2" & Lastrow).Select
String4 = Range("AC2" & Lastrow).Select
String4 = Range("AX2" & Lastrow).Select
full_string = String1 & String2 & String3 & String4 & String5
Worksheets("A_Feedback_Upload_20200722").Select
Range("A2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I am stuck with a VBA error when I am attempting to use the concatenate formula in sheet one to then paste in A2 of another sheet. (Also using Lastrow as Long)
Can anyone review, I am getting no errors, but my data is not pasting to the second sheet.
Sub Concatenate()
Dim String1 As String
Dim String2 As String
Dim String3 As String
Dim String4 As String
Dim String5 As String
Dim full_string As String
Dim Lastrow As Long
Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("Sheet1").Select
String1 = Range("AV2" & Lastrow).Select
String2 = Range("D2" & Lastrow).Select
String3 = Range("AW2" & Lastrow).Select
String4 = Range("AC2" & Lastrow).Select
String4 = Range("AX2" & Lastrow).Select
full_string = String1 & String2 & String3 & String4 & String5
Worksheets("A_Feedback_Upload_20200722").Select
Range("A2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub