-1

currently am pasting various cells from sheet "Hand Off" into "Weekday tracking". The "hand off" will be updated daily so have included a button at the bottom of it to run the macro. The various cells will paste into a row in an excel table with the date. Currently the various cells paste in the first blank row beneath which is good but I had wanted to paste them into an excel table to be able to later make pivot tables.

Attached is the code and a screenshot. Thanks!

Sub SummaryOfDailyHandOff()
Worksheets("Weekday Tracking").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Value = Date
Worksheets("Hand Off").Range("G61").Copy 'copies individual cells
Worksheets("Weekday Tracking").Range("D" & Rows.Count).End(xlUp).Offset(0, 0).PasteSpecial Paste:=xlPasteValues 'Pastes values of the formulae
Worksheets("Hand Off").Range("D54").Copy 'copies individual cells
Worksheets("Weekday Tracking").Range("E" & Rows.Count).End(xlUp).Offset(0, 0).PasteSpecial Paste:=xlPasteValues 'Pastes values of the formulae
Worksheets("Hand Off").Range("L21").Copy 'copies individual cells
Worksheets("Weekday Tracking").Range("F" & Rows.Count).End(xlUp).Offset(0, 0).PasteSpecial Paste:=xlPasteValues 'Pastes values of the formulae
Worksheets("Hand Off").Range("G54").Copy 'copies individual cells
Worksheets("Weekday Tracking").Range("G" & Rows.Count).End(xlUp).Offset(0, 0).PasteSpecial Paste:=xlPasteValues 'Pastes values of the formulae
Worksheets("Hand Off").Range("D64").Copy 'copies individual cells
Worksheets("Weekday Tracking").Range("H" & Rows.Count).End(xlUp).Offset(0, 0).PasteSpecial Paste:=xlPasteValues 'Pastes values of the formulae
Worksheets("Hand Off").Range("D69").Copy 'copies individual cells
Worksheets("Weekday Tracking").Range("I" & Rows.Count).End(xlUp).Offset(0, 0).PasteSpecial Paste:=xlPasteValues 'Pastes values of the formulae
End Sub

Screenshot of excel table

kca062
  • 1
  • 1
  • 1
    Stack Overflow is a Q & A website designed to allow the community of experts to respond to questions that people have about coding and programming. Your post should contain a detailed question, or problem that you are having. Currently, your post has no question and no problem described. – Toddleson Jun 01 '22 at 16:10
  • Perhaps see the section "Finding Last Row in a Table (ListObject)" in [this thread](https://stackoverflow.com/questions/11169445/error-in-finding-last-used-cell-in-excel-with-vba). – BigBen Jun 01 '22 at 17:27
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 02 '22 at 12:28
  • My problem is that the code currently skips over until the first blank row outside an excel table while I want it to go to the first blank row in an excel table. Thanks. – kca062 Jun 02 '22 at 13:19

0 Answers0