Automatically update graph - Excel - excel

I am trying to make an automatically updating graph.
This is what I am tring to do:
I am updating my data every day. So let's say I have the number 3000. I want today's date linked with that number.
So on 27-10 - 3000. And I want to add data every day. So on 28-10 it's 3010. etc. etc.
But I want to do this automatically. So every day the graph automatically adds the new data with current date.
I am unfamiliar with graphs and no clue how to do this. The only thing I know is the function TODAY() and that the data is always in a single cell: I8.
Any Help is much appreciated :)

Create a dynamic named range for your data (using OFFSET to dynamically include all new values). Example: http://analystcave.com/excel-dynamic-named-range/
Create a pivot table based on that data
Make a macro for refreshing the Pivot Table when data is updated (can record it with Macro Recorder) e.g.
See example below:
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
You can add this macro to the ActiveSheet change event or better even add a button to refresh the chart.

Related

How to create charts and formulas that update automatically in Excel

I am looking for a way to update formulas and charts daily in Excel.
I started as a working student recently and this is my first project for the logistic Team.
Currently we get the data from SAP which is then exported to Excel. Then we create formulas and charts manually.
They told me they do this every day even though, the formulas and charts are practically the same. The only difference is that the numbers change every day.
Now I want to find a way to update the formulas and charts daily on a specific time.
Also I want to create a Dashboard that does the same so they don't have to look at raw numbers anymore.
To Summarise the problem. I am looking for a way to create a dashboard that updates the formulas and charts automatically in Excel.
I am thankful for every advise.

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?

Excel : Selecting data and keeping it up to date

Ugh,
I'm not a hero when it comes to Excel...
I have an Excel file with one sheet that contains all data. It's basically a list of tickets, displaying the ticket ID, type, value and 5 dates per row.
I'm looking for a way to have new sheets in the Excel that actually display only tickets of a specific type. So on the sheet Bug Tickets I want to diplay like a filtered sub-set of the raw data in the first sheet.
However, this new sheet needs to refresh it's data automatically when I add new data to the main list.
Is this possible in Excel?
Ok here is a way using a Pivot Tables and Tables.
You should set it up like below: (in the SS, I put the pivot in the same sheet but you can put it in another).
Steps:
You need to create a table out of your data. See here on how to do it.
Then create a Pivot Table out of your table. See here on how to do it
After that you just need to format it the way you want.
The Pivot table will update everytime you add data on your table.
It will display what you've filtered.(in my example I filtered type A).
Notice: Apologies I cannot create a step by step procedure for you(very tedious). I wouldn't have posted this as answer if only it would fit as comment.

Always Use Same Range For Chart, Even After Inserting Rows

I currently have a macro that inserts new information every day in the top of a table and bumps the old data down. I want to have a chart that depicts the first 7 days of data.
What keeps happening is when the chart updates for the new day, the chart is still pulling data from the 7 previous days rather than bumping up to incorporate the newest day.
How Do I Fix This? I Essentially Just Want to Permanently Set where the charts data comes from so that it doesn't change when rows are inserted above.
I'd use the record macro option for this. Just start recording, update your references and stop recording. As you always want to use the same references you can record it once and you won't need to change anything in it, then you can just run that as part of your other macro.

Filter Excel Pivot Table based on previous business day

I'd like to filter an Excel Pivot Table based on the previous business day. I currently filter it dynamically for 'Yesterday', but that does not help on Mondays. Can this be done?
The only way to solve this I can see to write a macro that modifies the date filter in your pivot table. Inside the macro you can easily chech if yesterday was a weekend day to avoid them.
You can get familiar with the code you will need by starting a macro recording, changing manually the date, stopping the macro record, and then just open macro code source. Then modify it to analyze the date, and bind the result code to some button. Done.

Resources