2010 appending data

Dwjenkins

New Member
Joined
Nov 14, 2013
Messages
6
Good evening,

I am using excel 2010 and I have created a data connection to a SQL server. The query returns all data from a given date to the prior day, however, I envisage that the data set will grow quite large and that the data will start to to take longer to put into excel.

I have been googling how to append the data onto the end of existing data in the excel sheet. I have seen a few posts that looked similar but weren't quite was I was looking for.

i think what I need is VBA that will detect the last row, give me the date from a column in that row. I then it to pass that date something Microsoft query ( correct me if I wrong but I think I have to use that to pass my SQL query the parameter) and then this will allow me to hit the refresh button and it will just get me the data from the last date.

Alternatively if there is another way of doing this please advise.

regards,

Dave.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I have done some more googling but cannot find what I need.

To to get me started how do I find the last row that has data and what a value in a date in column b on the last row would be. I will be using that in the SQL as a parameter +1.
 
Upvote 0

Forum statistics

Threads
1,216,466
Messages
6,130,795
Members
449,593
Latest member
morpheous

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top