Hi All,
I pieced together some code here from what I have gotten from another thread that I recently created and some of my own knowledge.
Sub UpdatePeakBottomCycles()
Dim lr2 As Long, lc2 As Long, lr3 As Long, ws1 As Worksheet, ws2 As Worksheet
Set ws1 = Sheets("Data Table") '<---- Change as required
Set ws2 = Sheets("Peak Bottom Cycles")
Sheets("Data Table").Select
lr2 = ws1.Cells(ws2.Rows.Count, 1).End(xlUp).Row
lc2 = ws1.UsedRange.Columns.Count
Sheets("Peak Bottom Cycles").Select
lr3 = ws2.Cells(ws2.Rows.Count, 1).End(xlUp).Row
With ws2
ws2.Range("N23").Value = .Cells(lr3, 12)
ws2.Range("O32").Value = .Cells(lr2, 3)
ws2.Range("O33").Value = .Cells(lr2, 4)
ws2.Range("O34").Value = .Cells(lr2, 5)
ws2.Range("O35").Value = .Cells(lr2, 8)
End With
End Sub
Anyway, I must not be doing something correctly because the correct value in cell N23 populates, but none of the values in the O cells populate. I must not be defining my variable, lr2, correctly. Any ideas here? Thank you!