I am working on creating a tracking log. It consist of 3 sheets. The first sheet list all of my material that is going to be ordered. It has rows for quantity released and quantity received. Sheet 2 is a summary of sheet 1 and sheet 3 is my material order form. This sheet is what I will fill out for each order that is placed.
Sheet 1 references sheet 3 (using Vlookup) to fill in the quantity order and quantity received.
I have created a macro on my material order sheet (sheet 3) that created a new order sheet and and sheet 1 creates 2 new columns (1 - quantity released, 1 - quantity received) See code below.
Sub Test()
Dim ws As Worksheet
Set ws = Sheet1
Dim rLastCell As Range
Dim LastCol As Integer
Dim SecToLastCol As Integer
Set rLastCell = ws.Cells.Find(What:="*", After:=ws.Cells(1, 1), LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, MatchCase:=False)
LastCol = rLastCell.Column
SecToLastCol = rLastCell.Column - 1
ws.Columns(LastCol).Copy ws.Columns(LastCol + 2)
ws.Columns(SecToLastCol).Copy ws.Columns(SecToLastCol + 2)
End Sub
What I can't figure out now is how to get my 2 new rows to reference the new material form that was created. Any idea?
Bookmarks