Sub Selecteren()
'In this workbook zit ook nog een macro die uitgevoerd wordt bij afsluiten
Application.ScreenUpdating = False
With Sheets("Blad1")
With .Cells
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
.Borders(xlInsideVertical).LineStyle = xlContinuous
.Borders(xlInsideHorizontal).LineStyle = xlContinuous
End With
For r = 1 To .UsedRange.Rows.Count
For k = 1 To .UsedRange.Columns.Count
If IsNumeric(.Cells(r, k)) Or .Cells(r, k) = "" Then
Exit For
Else
If .Cells(r, k) = "Artikelnummer" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("A" & Rows.Count).End(xlUp).Offset(1)
If .Cells(r, k) = "Artikelnaam" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("B" & Rows.Count).End(xlUp).Offset(1)
If .Cells(r, k) = "Leveringsnaam" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("C" & Rows.Count).End(xlUp).Offset(1)
If .Cells(r, k) = "Secundaire verkoophoeveelheid" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("D" & Rows.Count).End(xlUp).Offset(1)
If .Cells(r, k) = "Secundaire eenheid" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("E" & Rows.Count).End(xlUp).Offset(1)
If .Cells(r, k) = "Hoeveelheid" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("F" & Rows.Count).End(xlUp).Offset(1)
If .Cells(r, k) = "Eenheid" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("G" & Rows.Count).End(xlUp).Offset(1)
If .Cells(r, k) = "Gevraagde ontvangstdatum" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("H" & Rows.Count).End(xlUp).Offset(1)
If .Cells(r, k) = "Leveringsmethode" Then .Range(.Cells(r, k), .Cells(r, k).End(xlDown)).Offset(1).Copy Sheets("Verzamelblad").Range("I" & Rows.Count).End(xlUp).Offset(1)
End If
Next k
With Sheets("Verzamelblad")
.Range(.Range("A" & .Range("C" & Rows.Count).End(xlUp).Offset(1).Row), .Range("I" & .UsedRange.Rows.Count + 1)).Delete
End With
Next r
End With
With Application
.Goto Sheets("Verzamelblad").Range("A2")
.ScreenUpdating = True
End With
'In this workbook zit ook nog een macro die uitgevoerd wordt bij afsluiten
End Sub