Do you have a code to do that? can you share it with us?
Did you try my code from post #2 to find the empty row?
Hi,
Yes I did try your code and it worked the same as mine but when I put only 2 items on the invoice the macro couldnt find any blank cells to fill in on the stock out sheet so as you said it pasted the data on an extra row down which is not really what I want to happen.
Below is my code for it all (dont laugh too much as I wrote some of it and used the macro recorder for a lot of it lol)
Sub Stockcontrol()
Sheets("Stock Out").Range("A" & Rows.Count).End(xlUp).Offset(1).Value = Sheets("Invoice").Range("C6").Value
Sheets("Stock Out").Range("B" & Rows.Count).End(xlUp).Offset(1).Value = Sheets("Invoice").Range("F6").Value
Sheets("Invoice").Select
Range("A9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Stock Out").Select
Range("C" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
Range("C9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Stock Out").Select
Range("D" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
Range("B9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Stock Out").Select
Range("E" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
Range("D9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Stock Out").Select
Range("G" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
Range("F9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Stock Out").Select
Range("H" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Delivery Note").Select
Set rng = Range("F14:F114")
rng.SpecialCells(xlCellTypeConstants).Select
Selection.Copy
Sheets("Stock Out").Select
Range("F" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Stock Out").Select
Range("H2").Select
Selection.End(xlDown).Offset(0, 1).Select
Range(Selection, Selection.End(xlUp)).Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Stock Out").Select
Range("H2").Select
Selection.End(xlDown).Offset(0, 2).Select
Range(Selection, Selection.End(xlUp)).Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Stock Out").Select
Range("C2").Select
Selection.End(xlDown).Offset(0, -2).Value = Sheets("Invoice").Range("C6").Value
Sheets("Stock Out").Select
Range("C2").Select
Selection.End(xlDown).Offset(0, -1).Value = Sheets("Invoice").Range("F6").Value
Sheets("Customer List").Select
Range("F3").Select
Selection.Copy
Sheets("Stock Out").Select
Range("K" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Stock Out").Select
Range("H2").Select
Selection.End(xlDown).Offset(0, 3).Value = Sheets("Customer List").Range("F3").Value
Sheets("Stock Out").Select
Range("C2").Select
Selection.End(xlDown).Offset(0, -2).Select
Range(Selection, Selection.End(xlUp)).Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Dim lr As Long
Sheets("Invoice").Select
Range("C6").Select
Selection.Copy
Sheets("Stock Out").Select
lr = Range("A" & Rows.Count).End(xlUp).Row
Range("A1:A" & lr).SpecialCells(xlCellTypeBlanks).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
Range("F6").Select
Selection.Copy
Sheets("Stock Out").Select
lr = Range("B" & Rows.Count).End(xlUp).Row
Range("B1:B" & lr).SpecialCells(xlCellTypeBlanks).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Customer List").Select
Range("F3").Select
Selection.Copy
Sheets("Stock Out").Select
lr = Range("K" & Rows.Count).End(xlUp).Row
Range("K1:K" & lr).SpecialCells(xlCellTypeBlanks).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
End Sub