Geacht forum,
Onderstaande deel macro (deel van een grotere macro..) werkt al jaren naar tevredenheid,
Nu wil ik deze iets aanpassen, maar mij ontbreekt de juiste kennis om dit voor goed elkaar te krijgen.
Ik wil nml.
Het paste gedeelte wordt nu in kolom A gekopieerd, ( .Range("A70").PasteSpecial xlPasteValues) dit wil ik naar kolom B hebben, alleen het aanpassen van A naar B werkt niet.
In kolom A komt nu een formule te staan waardoor het vanaf regel ".Range("h103:k104").Copy // .Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues " fout loopt.
en de regels onderaan kolom A komen (daar waar de formule eindigd)
End If
Sheets("Masterdata eindproduct").Select
If Range("c26") = 1 Then GoTo 1
Sheets("Recept eindproduct").Visible = True
Sheets("Recept eindproduct").Select
ActiveSheet.Unprotect
Application.ScreenUpdating = False
With Sheets("Masterdata eindproduct")
Columns(1).Find("HAW").CurrentRegion.Copy
.Range("A70").PasteSpecial xlPasteValues
.Range("h103:k104").Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
Columns(1).Find("HALB").CurrentRegion.Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 2).PasteSpecial xlPasteValues
.Range("h107:k109").Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
End With
Sheets("Recept eindproduct").Select
If Range("k16") > 0 Then
Application.ScreenUpdating = False
With Sheets("Masterdata eindproduct")
Columns(9).Find("HAW").CurrentRegion.Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 4).PasteSpecial xlPasteValues
.Range("h103:k104").Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
Columns(9).Find("HALB").CurrentRegion.Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 2).PasteSpecial xlPasteValues
.Range("h111:k113").Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
End With
With Application
.CutCopyMode = False
.ScreenUpdating = True
End With
Gr
Botje
Onderstaande deel macro (deel van een grotere macro..) werkt al jaren naar tevredenheid,
Nu wil ik deze iets aanpassen, maar mij ontbreekt de juiste kennis om dit voor goed elkaar te krijgen.
Ik wil nml.
Het paste gedeelte wordt nu in kolom A gekopieerd, ( .Range("A70").PasteSpecial xlPasteValues) dit wil ik naar kolom B hebben, alleen het aanpassen van A naar B werkt niet.
In kolom A komt nu een formule te staan waardoor het vanaf regel ".Range("h103:k104").Copy // .Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues " fout loopt.
en de regels onderaan kolom A komen (daar waar de formule eindigd)
End If
Sheets("Masterdata eindproduct").Select
If Range("c26") = 1 Then GoTo 1
Sheets("Recept eindproduct").Visible = True
Sheets("Recept eindproduct").Select
ActiveSheet.Unprotect
Application.ScreenUpdating = False
With Sheets("Masterdata eindproduct")
Columns(1).Find("HAW").CurrentRegion.Copy
.Range("A70").PasteSpecial xlPasteValues
.Range("h103:k104").Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
Columns(1).Find("HALB").CurrentRegion.Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 2).PasteSpecial xlPasteValues
.Range("h107:k109").Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
End With
Sheets("Recept eindproduct").Select
If Range("k16") > 0 Then
Application.ScreenUpdating = False
With Sheets("Masterdata eindproduct")
Columns(9).Find("HAW").CurrentRegion.Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 4).PasteSpecial xlPasteValues
.Range("h103:k104").Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
Columns(9).Find("HALB").CurrentRegion.Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 2).PasteSpecial xlPasteValues
.Range("h111:k113").Copy
.Range("A" & .Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
End With
With Application
.CutCopyMode = False
.ScreenUpdating = True
End With
Gr
Botje