C
Cimjet
Hi Everyone
The small macro below copies the information from row 20 on to an order form
sheet.
I need to have it check from row 20 to row 36 and copy it if column B starts
with a number.
Your help is always appreciated. Thank you
Sub Parts_Order()
With Sheets("Parts Order Form")
'QTY
lLastRow = .Cells(.Rows.Count, "a").End(xlUp).Row
.Cells(lLastRow + 1, "a").Value = _
Sheets("Invoice").Range("A20").Value
'Part Number
lLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
.Cells(lLastRow + 1, "B").Value = _
Sheets("Invoice").Range("b20").Value
End With
End Sub
Sub Parts_Order()
'Invoice Number
lLastRow = .Cells(.Rows.Count, "d").End(xlUp).Row
.Cells(lLastRow + 1, "d").Value = _
Sheets("Invoice").Range("K2").Value
'QTY
lLastRow = .Cells(.Rows.Count, "a").End(xlUp).Row
.Cells(lLastRow + 1, "a").Value = _
Sheets("Invoice").Range("A20").Value
'Part Number
lLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
.Cells(lLastRow + 1, "B").Value = _
Sheets("Invoice").Range("b20").Value
End With
End Sub
Regards
Cimjet
The small macro below copies the information from row 20 on to an order form
sheet.
I need to have it check from row 20 to row 36 and copy it if column B starts
with a number.
Your help is always appreciated. Thank you
Sub Parts_Order()
With Sheets("Parts Order Form")
'QTY
lLastRow = .Cells(.Rows.Count, "a").End(xlUp).Row
.Cells(lLastRow + 1, "a").Value = _
Sheets("Invoice").Range("A20").Value
'Part Number
lLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
.Cells(lLastRow + 1, "B").Value = _
Sheets("Invoice").Range("b20").Value
End With
End Sub
Sub Parts_Order()
'Invoice Number
lLastRow = .Cells(.Rows.Count, "d").End(xlUp).Row
.Cells(lLastRow + 1, "d").Value = _
Sheets("Invoice").Range("K2").Value
'QTY
lLastRow = .Cells(.Rows.Count, "a").End(xlUp).Row
.Cells(lLastRow + 1, "a").Value = _
Sheets("Invoice").Range("A20").Value
'Part Number
lLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
.Cells(lLastRow + 1, "B").Value = _
Sheets("Invoice").Range("b20").Value
End With
End Sub
Regards
Cimjet