Hi all,
I am using the following tutorial from you: https://www.teachexcel.com/excel-tutorial/find-the-next-blank-row-with-vba-macros-in-excel_1261.html
Now I have the problem that Excel puts the data at the bottom of the table (output) and not at the top of the first (blank) row. Why is this?
Sub Invoice_input()
ws_output = "Invoicing"
next_row = Sheets(ws_output).Range("C" & Rows.Count).End(xlUp).Offset(1).Row
Sheets(ws_output).Cells(next_row, 1).Value = Range("PO_Reference1").Value
Sheets(ws_output).Cells(next_row, 8).Value = Range("POnumber").Value
Sheets(ws_output).Cells(next_row, 9).Value = Range("Actual_shipping_date").Value
Sheets(ws_output).Cells(next_row, 11).Value = Range("Client_name").Value
Sheets(ws_output).Cells(next_row, 10).Value = Range("Client_number").Value
Sheets(ws_output).Cells(next_row, 12).Value = Range("Destination_country").Value
Sheets(ws_output).Cells(next_row, 13).Value = Range("Product_category").Value
Sheets(ws_output).Cells(next_row, 14).Value = Range("Product_description1").Value
Sheets(ws_output).Cells(next_row, 15).Value = Range("Product_price1").Value
Sheets(ws_output).Cells(next_row, 16).Value = Range("Product_description2").Value
Sheets(ws_output).Cells(next_row, 17).Value = Range("Product_price2").Value
Sheets(ws_output).Cells(next_row, 18).Value = Range("Product_description3").Value
Sheets(ws_output).Cells(next_row, 19).Value = Range("Product_price3").Value
Sheets(ws_output).Cells(next_row, 20).Value = Range("Price2").Value
Sheets(ws_output).Cells(next_row, 21).Value = Range("BTW").Value
Sheets(ws_output).Cells(next_row, 22).Value = Range("Priceexbtw").Value
Sheets(ws_output).Cells(next_row, 23).Value = Range("VAT_percentage").Value
Sheets(ws_output).Cells(next_row, 24).Value = Range("Invoice_description2").Value
MsgBox "Invoice data has been created. You can find this in the Invoicing tab."
End Sub