# data[].attributes.attachment_link.title
PRESENTATION Macros and VBA Part 1 HANDOUT

# data[].attributes.body
Sub livepractice()

Dim ws As Worksheet

For Each ws In Worksheets

ws.Activate

If Left(ws.Name, 4) <> "RECN" And ws.Name <> "Summary" And ws.Name <> "Consolidator" Then

Range("A" & Rows.Count).End(xlUp).Select

e = Selection.Row

Selection.End(xlUp).Select

y = Selection.Row

Selection.End(xlUp).Select

x = Selection.Row

Range("E" & x).GoalSeek Goal:=0, ChangingCell:=Range("C9")

Range("L" & e).GoalSeek Goal:=0, ChangingCell:=Range("E" & y - 4)

contractnumber = Range("C2").Value

cxno = Range("C3").Value

sfcrate = Range("G" & e + 4).Value

a = Range("I" & e + 2).Value

b = Range("J" & e + 2).Value

c = Range("K" & e + 2).Value

d = Range("L" & e + 2).Value

Sheets("Consolidator").Activate

Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select

Selection.Value = cxno

Selection.Offset(0, 1).Value = contractnumber

Selection.Offset(0, 2).Value = a

Selection.Offset(0, 3).Value = b

Selection.Offset(0, 4).Value = c

Selection.Offset(0, 5).Value = d

Selection.Offset(0, 6).Value = sfcrate

End If

Next ws

End Sub