Values in Excel cells only refresh on save - excel

I have a workbook which contains many formulas. Up until a few days ago whenever source data was manually updated all the calculated values in cells containing formulas also automatically refreshed. In order to get calculated values to now refresh we have to click CTRL-S to save the sheet - then all the values update. Does anyone is there is a workbook setting that controls whether calculated values refresh in real-time when source value cells change or only upon saving?

File>Options>Formulas>Workbook Calculation
Set to Automatic. See screenshot below.
If it's already set to Automatic, then you may have some VBA messing this up somewhere.

Related

Excel Add in - Refresh only my custom functions in a specific sheet

I want to update custom formulas added my Excel add in. Using Application/worksheet.Caclulate() updates whole sheet, but I want to update only those cells which are using my formulas.
I haven't tried this, but what if you used the technique described in Get formulas from a range of cells on the entire UsedRange of a worksheet. Then iterate through the returned array to find all the cells that have formulas matching one of yours. Then for each of those cells, call Calculate().
The Application object provides a method to force an immediate recalculation. Application.calculate(calculationType) starts a manual recalculation based on the specified calculationType. The following values can be specified.
full: Recalculate all formulas in all open workbooks, regardless of whether they have changed since the last recalculation.
fullRebuild: Check dependent formulas, and then recalculate all formulas in all open workbooks, regardless of whether they have changed since the last recalculation.
recalculate: Recalculate formulas that have changed (or been programmatically marked for recalculation) since the last calculation, and formulas dependent on them, in all active workbooks.
So, you could play with an argument to get the required piece recalculated.

Excel #ref error: Occurs when data is refreshed

I have made a connection in excel to another excel workbook, using the native functionality found under the data tab in excel. I imported the data into my "Main" excel workbook from the "Other" workbook by Selecting Data->existing connections and then opening the relevant sheet. This allowed me to link the data from my other workbook to my Main workbook.
My issue is when the data in the Other workbook is changed i received a #ref error in my Main workbook. The formulas i use on the imported data are pasted in a separate sheet (i tried pasting it next to the imported data as well). Note: i paste the formulas from row 1 - 500 for the respective column, so that when the data is imported the formula automatically populates the cell with the correct value. When i refresh the data (i.e when data has been changed in the Other workbook) It seems as the formulas i have copied down do not reference the correct cell anymore.
I have tried using an indirect but to no success.
This is what the formula i use looks like
=IF(INDIRECT("A"&ROW(#REF!))<>"",VLOOKUP(INDIRECT("A"&ROW(#REF!)),'Safex Codes'!$A$1:$H$1000,8,0),"")
However when the data is refreshed "SOME" of the rows in the column the formula is in return this formula
=IF(INDIRECT("A"&ROW(#REF!))<>"",VLOOKUP(INDIRECT("A"&ROW(#REF!)),'Safex Codes'!$A$1:$H$1000,8,0),"")
This occurs everytime i refresh the data. What is strange is that at the end of my data, hence the last time the formula is being called, the referencing to the correct row is completely off.
For example in row 28 i would expect the above formula to reference a28, however i receive
=IF(INDIRECT("A"&ROW(A24))<>"",VLOOKUP(INDIRECT("A"&ROW(A24))
I'll bet that you're having the same issue I was. When the number of rows in the data range changes, the unused cells previously populated with data are deleted. The formulas that referenced those deleted cells no longer have references to them because they've been deleted (hence the #REF errors).
You can change Excel's behavior with respect to handling new or unused rows using the Properties menu on the Data tab.
In that menu, take a look at the section labeled "If the number of rows in the data range changes upon refresh." I'm guessing you have the first option checked. Try the third option.

How can I make my excel formulas calculate after values have been added programatically

I have a .net program that updates values in an excel sheet programmatically using an OLEDB connection.
my excel sheet has some simple SUM formulas that sum the values that are programmatically updated. The problem is that since the values are updated while the excel sheet is closed my formulas do not calculate when the sheet is opened. When I press calculate sheet button the formulas are still not executed (because excel does not recognize that the new values have been added, possibly?). The only way I can get them to execute is if I click on the cell holding the formula (As if to modify the formula) then press enter(making excel reevaluate the cells). I have calculation option set to automatic and my data types are correct (general for the formulas and number for the number values). Is there any way I can make the spreadsheet calculate the formulas when I open it?
Try pressing ctrl+alt+f9 which should force a full calculation and not just a recalculation (like the calculate button does) that looks at cells that have changed.
More info on calculation material can be found here.
For vba I believe it is
Application.CalculateFull
Maybe this will work
Private Sub Workbook_Open()
Worksheets(1).Calculate
End Sub
Just in case someone runs into this problem: To do a full recalculation in vba you can use Application.CalculateFullRebuild to force a full calculation.

How Do I Stop Access From Importing Every Excel Cell

In Access and Excel 2013, I am simply trying to import an Excel tab into Access. For some reason, Access is importing all 1,048,575 rows, but only the 42 columns I have in the Excel sheet. I am positive (through several methods and attempts) that there are no blank cells or random data entered into an obscure cell - its clean. Does anyone know why Access is bringing every row in? I have let Access dictate the primary key, created my own, added a column, etc - still brings in every row.
I appreciate the help.
Deleting (right click delete) all cells below the data, within the populated rows, configures the Used Range to the cells that contain data, rather than the final cell in the worksheet in Excel.

Excel Don't Change Data on Refresh

I have two sheets in an XLS file. 1st Sheet pulls up some data from web and updated. 2nd Sheet is analysis of the data in Sheet-1.
Now whenever I refresh data in sheet-1, the data in cells in Sheet-2 automatically refreshes. I want to stop this. I want to cells become inactive in Sheet-2 and thus don't have any impact of refresh and their values remains the same even after refresh.
How, is this possible? In other words, when I refresh I want to see the previous analysis and new analysis both. But when I refresh the same, the previous data is lost.
Disable automatic calculation (file / options / formulas), i.e. choose "Manual calculation".
Activate the import sheet that loads data from web. Calculate (i.e. refresh) this sheet only (Menu: Formulas / Calculate Sheet).
Now, the import sheet should be up to date, but the second sheet should still show the old values.
To finally synchronize both sheets again, either activae automatic calculation, or just press (forces workbook calculation incl. all sheets).

Resources