I am not very good with Macros or VBA and have been trying to write a VBA to perform a copy of specific columns where a "Yes" is detailed in the entirety of Column L and if identified to then paste any data held in that row between Column A:M from that sheet to another sheet starting at Cell A54.
I am hoping that it may also be possible that once the data has been reviewed and the pasted data showing a "Yes" is changed to "Complete" that it would either replace the data it was taken from or change it in the initial sheet before it was copied from "Yes" to "Complete"
There are multiple sheets that this data with a "Yes" needs to be identified which are detailed as Sheet1, then Sheet4 to Sheet14.
The destination Sheet for the data with a "Yes" to be pasted to is Sheet3 and Cell A54 and any data taken from these 12 sheets needs to be copied in the next available blank line once 1 sheet of data is pasted etc...
Sheet2 is not in use for anything other than data used for other functions in cells such as lists etc...
The reason I am doing a VBA is to automatically have this run each time the workbook is open which will be a shared book.
I have attached below what I had put together but as I said earlier I am not very good at this and any help would be appreciated please.
Regards
Jase
Sub Import_Aux_Yes()
A = Worksheets("Sheet3").Cells(Rows.Count, 1).End(xlUp).Row
For i = 3 To A
If Worksheets("Sheet1").Cells(i, 12).Value = "Yes" Then
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet3").Activate
b = Worksheets("Sheet3").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet3").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet4").Activate
b = Worksheets("Sheet4").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet4").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet5").Activate
b = Worksheets("Sheet5").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet5").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet6").Activate
b = Worksheets("Sheet6").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet6").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet7").Activate
b = Worksheets("Sheet7").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet7").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet8").Activate
b = Worksheets("Sheet8").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet8").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet9").Activate
b = Worksheets("Sheet9").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet9").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet10").Activate
b = Worksheets("Sheet10").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet10").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet11").Activate
b = Worksheets("Sheet11").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet11").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet12").Activate
b = Worksheets("Sheet12").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet12").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet13").Activate
b = Worksheets("Sheet13").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet13").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet14").Activate
b = Worksheets("Sheet14").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet14").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
End If
Next
End Sub
I am hoping that it may also be possible that once the data has been reviewed and the pasted data showing a "Yes" is changed to "Complete" that it would either replace the data it was taken from or change it in the initial sheet before it was copied from "Yes" to "Complete"
There are multiple sheets that this data with a "Yes" needs to be identified which are detailed as Sheet1, then Sheet4 to Sheet14.
The destination Sheet for the data with a "Yes" to be pasted to is Sheet3 and Cell A54 and any data taken from these 12 sheets needs to be copied in the next available blank line once 1 sheet of data is pasted etc...
Sheet2 is not in use for anything other than data used for other functions in cells such as lists etc...
The reason I am doing a VBA is to automatically have this run each time the workbook is open which will be a shared book.
I have attached below what I had put together but as I said earlier I am not very good at this and any help would be appreciated please.
Regards
Jase
Sub Import_Aux_Yes()
A = Worksheets("Sheet3").Cells(Rows.Count, 1).End(xlUp).Row
For i = 3 To A
If Worksheets("Sheet1").Cells(i, 12).Value = "Yes" Then
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet3").Activate
b = Worksheets("Sheet3").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet3").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet4").Activate
b = Worksheets("Sheet4").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet4").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet5").Activate
b = Worksheets("Sheet5").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet5").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet6").Activate
b = Worksheets("Sheet6").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet6").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet7").Activate
b = Worksheets("Sheet7").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet7").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet8").Activate
b = Worksheets("Sheet8").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet8").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet9").Activate
b = Worksheets("Sheet9").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet9").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet10").Activate
b = Worksheets("Sheet10").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet10").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet11").Activate
b = Worksheets("Sheet11").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet11").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet12").Activate
b = Worksheets("Sheet12").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet12").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet13").Activate
b = Worksheets("Sheet13").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet13").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Cells(i, 1).Copy
Worksheets("Sheet14").Activate
b = Worksheets("Sheet14").Cells(Rows.Count, 4).End(xlUp).Row
Worksheets("Sheet14").Cells(A54).Select
Selection.PasteSpecial Paste:=xlPasteValues
End If
Next
End Sub