Transferring Data from Access to Excel

glamlife

New Member
Joined
Oct 30, 2002
Messages
18
Hello!

I am trying to set up a relationship between a financial model in Excel and an Access database. Currently I've set up an MS Query to bring my Access data into Excel. But my problem is that the linked sheets which run off this data will need to add or delete rows if the number of records in the database changes. (The financial model should have a row for each record in the database plus a GRAND TOTAL row.)

Is there a straightfoward way for Excel to add or delete rows (copying formulas as necessary & preserving the GRAND TOTAL row)
in a spreadsheet based on the number of records coming from Access? Is it necessary to use VBA?

Any advice would be appreciated.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi Glam,

This is actually more of an Excel question. You can define a dynamic range for your data. You can search the board for more examples (type in "Dynamic Range" after you click on Search above, and also click on "find all words" - or whatever it says to that effect).

But as an example, say the sheet in your workbook that contains the MS Query data is called "Data1". In Excel, go to Insert-Name-Define, and type in a name in the box at the top (like rngQueryData). In the "Refers To:" box, type

=OFFSET(Data1!$A$1,,,COUNTA(Data1!$A:$A),COUNTA(Data1!$1:$1))

This assumes that your data is continuous on that sheet (that there is only the data from the query, and that the data starts in A1).

HTH,

Russell
This message was edited by Russell Hauf on 2003-01-20 18:23
 
Upvote 0

Forum statistics

Threads
1,221,510
Messages
6,160,226
Members
451,632
Latest member
purpleflower26

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