Merging a SQL Table and an Excel Table

kopp123

New Member
Joined
Apr 7, 2014
Messages
9
Hello, I'm just entering the world of connecting to SQL via Excel, so please bear with me if I don't get any of this terminology right. I'm trying to merge live sales data that I import from SQL with static cost values that I track within the same workbook.

In my previous iteration of this workbook, I would manually update the sales information every so often, but it was a pain and immediately out of date. That said, it was easy enough to paste in the new data in columns A-D and then the table would auto calculate columns E-G via INDEX(MATCH()) and SUMIF() functions.

I have the SQL data importing into columns A-D, but any formulas I add in columns E-G don't automatically fill down when the SQL data is refreshed. I can't figure out how to do a join with a table in the same workbook (I'd really like to keep this all in a single file for storage and sharing reasons).

When I've done similar efforts in Power BI, I would add a new column in the modelling tab, but that doesn't seem to work here. Any help or resources as I dig into this area? Thanks much!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
OK, so I think I figured this out, it's pretty straightforward.

I created the local data on a new sheet, made it a table, and renamed it. With the table selected, go to the Data ribbon, select From Table (in the Get & Transform section). That will bring the table in as a new source and allow you to join to the other SQL sources as part of your queries.

Let me know if there's a better way to do this. Thanks.
 
Upvote 0

Forum statistics

Threads
1,215,641
Messages
6,125,982
Members
449,276
Latest member
surendra75

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