PDA

View Full Version : Copying and pasting values into a table below the previous entry for many days



Andrew160203
06-02-2021, 01:07 AM
I have an automatically feeding data stream from our accounting program which automatically updates daily.
I want to copy and paste the data into a table in order to create a line-graph of our business metrics.
i need to craft a vba query to automatically copy and paste certain cells into a table, each day below the other i.e. on monday it needs to paste into A1, on tuesday - A2, wednesday A3 etc.


Can anyone write this for me?

Andrew160203
06-04-2021, 06:04 PM
please help me :)
My deadline is encroching.

mana
06-05-2021, 07:25 PM
cells(rows.count, "A").end(xlup).offset(1)

SamT
06-06-2021, 09:11 AM
I have an automatically feeding data stream from our accounting program which automatically updates daily.
Tell us about that Stream... What format is it in? What is the mechanism you receive it by? What is it's structure?


i need to craft a [] query
Tell us about the Data Base... What is the Connection String? What is/are the names of the Tables of interest? What are the Fields of interest? What is the relationship of the Fields to the Columns/Headers of the Table you want to create?

Without knowing all that, mana (http://www.vbaexpress.com/forum/member.php?61551-mana) has already provided the best answer we can, given the paucity of information in your post.

OK, I can expand on mana's code a tiny little bit

For each day
Sheets("SheetName").Cells(rows.count, "A").End(xlUp).Offset(1) = Range(datastream)
Next