This is the code I used which copies the information from sheets("Customer Info") into "Sheet1"
Some of the customers on the sheet "Customer Information" will have additional orders. How could I make an additional macro which will copy information from "Customer Info" Into "sheet2" IF column H is not blank?
Something like that perhaps?
VBA Code:
Sub CopyOrder()
Dim sh1 As Worksheet, sh3 As Worksheet
Dim i As Long
Set sh1 = Sheets("Customer Info")
For i = 2 To sh1.Range("A" & Rows.Count).End(3).Row
Sheets("Sheet1").Copy after:=Sheets(Sheets.Count)
Set sh3 = ActiveSheet
sh3.Name = "Order" & i - 5
sh3.Range("B4").Value = Date
sh3.Range("B6").Value = Date + 1
sh3.Range("B8").Value = "No"
sh3.Range("B11").Value = sh1.Range("R" & i).Value
sh3.Range("B19").Value = sh1.Range("B" & i).Value
sh3.Range("B14").Value = sh1.Range("D" & i).Value
sh3.Range("B15").Value = sh1.Range("E" & i).Value
sh3.Range("B16").Value = sh1.Range("F" & i).Value
sh3.Range("B20").Value = sh1.Range("H" & i).Value
sh3.Range("B34").Value = "Jane Doe"
sh3.Range("B38").Value = "John Doe"
sh3.Range("E14").Value = sh1.Range("O" & i).Value
sh3.Range("E15").Value = sh1.Range("P" & i).Value
sh3.Range("E16").Value = sh1.Range("Q" & i).Value
Next
End Sub
Some of the customers on the sheet "Customer Information" will have additional orders. How could I make an additional macro which will copy information from "Customer Info" Into "sheet2" IF column H is not blank?
VBA Code:
Range("H:H").Value<>""
Something like that perhaps?