Excel Recalc all EXCEPT for query updates - excel

I have a very large database that comes from a sequel server - I update it once a day.
It feeds several pivot tables, some of which use date range (calculated fields) within the database to display segments of the data.
When I change the cells that feed the formulas in the database, I need to recalculate those formulas and the pivot tables. I do not want to REFRESH the feed from the sequel server which takes up two minutes to populate at times.
I need a quick VBA code to UPDATE ALL except for the data feed....
Any ideas?
Mark
(also - when I use the Recalc macro it recalcs the pivot tables first and then updates the queries in the background...seems backwards, although it doesn't matter as I have updated the queries already)

Related

How to add multiple Dynamic Power Queries into one spreadsheet excel

Is it possible to insert multiple dynamic power queries, one on top of the other, into a single excel spreadsheet and have the queries refresh when new data has been added to the tables?
I have six different dynamic power queries from six different tables.
When I put each query into their own spreadsheet by themselves they work perfectly. When I add additional data to the table and refresh the query the new data is added to the query worksheet.
However, when I place all six queries into one worksheet one on top of the other, the new data added to the tables will not refresh.
Any help would be greatly appreciated.
Using Excel 365 on Windows 10

Excel Table Rows Moving on Power Query Refresh

I have a Power Query connection that's pulling data from a CSV file into an Excel table. I have then added columns to that table in Excel and added some data to those columns manually.
The issue I have is that whenever I refresh the Power Query, the 'manual' data rows don't stay lined up with the Power Query rows. Specifically, it seems that the manual data all gets shunted down a row in relation to the Power Query data, although even that isn't completely consistent.
I tried unselecting the 'Preserve column sort/filter layout' option in External Data Properties, but that went horribly wrong, as it just removes all of the manually added data from the table completely.
The Power Query itself is very simple, it just takes the CSV data, promotes the headers, changes a couple of types and removes a few columns - there's not even any data filtering going on.
Any assistance much appreciated!

Refresh only internal connections in excel power query / Data model

I have a rather large datamodel in excel. it consists of an imported data mart featuring one fact table and around 20 dimension tables.
I also have 3 tables directly in the excel sheet, where users can enter data, that then gets merged into the existing datamodel using power query.
I would like to be able to update the datamodel thereby updating the content of my pivot tables and my calculations, without refreshing the actual data coming from my external server.
Is this possible without having to disable external data connections i the sheet (I'd like to periodically update the data)
For clarification, i am building a KPI that will be measured monthly on data present on the 1st of every month, but will have to be analyzed, commented, and have outliers handled throughout the month.
You've not mentioned VBA in your question, but going by the fact you've tagged your question as VBA, I'm guessing that's what you're using?
VBA code to refresh a single query is:
Sheets("sheetName").ListObjects("queryName").Refresh
If you're trying to do it manually, then it's just a question of selecting a cell within the table the query is pulling to, and then Query > Refresh.

Excel 2010 check cells in a row contain data before the Selection Change fires

I have an Excel 2010 data table which is driven by a query from MSSQL. The underlying query changes depending upon what options the user selects in the Excel workbook. I'm okay with changing the query and pulling the data.
After the data has been selected multiple users will be able to edit and append data to the Excel table and these changes will post back to the SQL database table. Due to the database table structure some of these cells within a given row are mandatory before any data can be inserted into MSSQL and/or potentially updated.
So what I'm trying to achieve is checks on whether certain columns in a row are blank after a cell is edited (I can do this via Worksheet Change) and also before they move off that row so I can bring up a message if all mandatory columns haven't been entered. I can't see any events that fire before Selection Change. My only thoughts on a workaround is to have a global variable row marker that is updated on Selection Change, i.e. it will store the previous row number. I can't use Excel's standard data validation functionality looking at blank cells because although this is fine for a currently correctly populated row that is being edited, inserting new rows or appending directly to the bottom of the table will constantly error as all those mandatory columns will, of course, be blank. Currently I am using conditional formatting to at least highlight columns/cells that require input although this doesn't force users to actually do it. Data cannot be stored within MSSQL until these columns contain data so if they don't fill them in and refresh the table for whatever reason, whatever they have entered will be lost. Obviously this is bad, m'kay. I am concerned about both the Worksheet Change and Selection Change events constantly firing and how that will affect workbook performance.
Any suggestions would be appreciated. Maybe I'm going about this all wrong so any ideas to make this more efficient would also be well received. The user base do not want to see UserForms or MS Access even though it would make this activity very easy. They are too used to the look and feel of Excel sheets.
your best way is to copy the table into 2d array or some other data structure in memory such as dictionary or collection. and than manage each change in memory. this one is very efficient but requires a lot of code. with excel the only problem you have is the key the rest is vlookup and true false questions. vlookup will find the original value and then you have current data + previous data + the logic... is the new data ok?

Merge and sort data from multiple tabs to a single "Master" tab in Excel

Our company was using Google Sheets for the last several months and we had a system working great, but are now transitioning to Excel.
The tab in the Google Sheet where all the data is merged and sorted is called MASTER TEST and is found here
In Google Sheet we used formula:
=query({Data1, Data2, Data3},"Select Col1, ... where Col1 is not null order by Col1")
Data is merged: {Data1, Data2, Data3} is data from multiple tabs.
The result is merged and sorted data. How can I make the same report in Excel?
Basically, every call we receive is logged in a spreadsheet in a tab unique to each representative. We have a CURRENT WEEK tab which is supposed to hold a static version of all the calls received by every rep, sorted by date. In Sheets this was done with a =query() formula, but Excel does not seem to support such a thing.
I tried using Data>From Other Sources>From Microsoft Query but frankly this does not work since it only grabs the data from columns with data validation and gets very slow and breaks with too much data.
Pivot Tables in Excel VS query in Google Sheet
I suggest you using Pivot Tables, or Pivot Query in Excel. Here's some explanations:
Pivot Tables in Excel can handle big data very fast, query in Google Sheets can't do this
but query is more flexible and it refreshes simultaneously.
So if you are willing to work with data in excel, it may be harder to set your report. Sorting is easy task for Pivot Tables, but merging data from multiple tabs is not so easy.
Merging data
The goal in your case is to merge data from multiple tabs in excel. You can make it in two ways:
Use VBA to collect data into single tab.
Use Pivot Tables. Here's tutorial on how to accomplish this.
And still the best way for data manipulating is to use single tab for all your data.

Resources