Forum Discussion
STOCKHISTORY FUNCTION
1) Previous file - we could replace errors on nothing and tables will be refreshed correctly
2) OFFSET - with an error in stockhistory query is not evaluated, thus table in excel sheet is not updated and you see what was returned on previous successful refresh
3) Duplications - you don't expand separate tables and merge them after that, but expand all tables and named ranges are in Excel at once, includes already returned by queries on previous refresh tables.
After that you expand all columns but DATE.1, CLOSE, VOLUME
If to rename DATE.1 to DATE it expands one more time.
In general such approach gives unpredictable results.
I worked on the solutions you proposed, but the Table.NestedJoin(), removes the dates which does not coincide in the merged column. So I tried Table.Combine() instead, which seems to append instead of merging thus maintaining all the dates from both columns which is what I need, the problem I am encountering now, is with Column2 and Column3 as they expand and retract depending on if there is any data in the Stockhistory(). If I apply any steps to any of those columns, the query refresh returns error stating that those columns can`t be found, Can you suggest a way to include those columns dynamically, so that when there is data they appear and when there is no data they don not interrupt the refresh.