Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

cells not recalculating

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Cells not recalculating

Cells not recalculating

ResolvedVersion 365
Edited on Wed 13 Apr 2022, 10:37

Karl has attended:
Excel VBA Introduction course

Cells not recalculating

Hello Marius,

Thanks for that suggestion, but still doesnt work. The code for the import looks like this:

Sub ImportDirectory()


Dim sourceworkbook As Workbook
Dim currentworkbook As Workbook

Set currentworkbook = ThisWorkbook
Set sourceworkbook = Workbooks.Open("P:\Reporting\VBA\Projects\Client\Directory.xlsx")

For Each Sheet In sourceworkbook.Sheets
Sheet.Copy After:=currentworkbook.Sheets(currentworkbook.Sheets.Count)
Next

End Sub




should be said that to get the formulas in the sourceworkbook I did "show formulas", pasted that into a word doc, and then into the excel sheet, to avoid the linking between workbooks that excel does automatically.

example of the formulas below:


=IFERROR(INDEX(GfuPivot1!$N$3:$AC$26,MATCH('GFU Final For Website'!$B7,GfuPivot1!$M$3:$M$26,0),MATCH('GFU Final For Website'!C$5,GfuPivot1!$N$2:$AC$2,0)),"")

=IFERROR(VLOOKUP(F39,GfuPivot2!M:N,2,FALSE),"")


let me know if that helps.



RE: Cells not recalculating

Hello Karl,

Thank you for your question. Without knowing what your data or VBA code looks like, might I suggest you insert the line Sheets("Sheet1").Calculate, (example sheet name) for a specific sheet, or simply the line Calculate to calculate the entire workbook after your code which pulls in the data from the other workbook.

I hope this helps. If not, please do post again.

Kind regards
Marius Barnard
STL

Tue 19 Apr 2022: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Sum Up All the Values in A Column

If you want to quickly calculate the Summed values of all cells in a column in Excel 2003 normally you would use the SUM formula. (eg if you wanted to calculate the values in Column C rows 10 to 25) the formula would be:

=SUM(C10:C25)

However, if you keep adding values to column C you would keep having to modify the above SUM formula which can get quite annoying.

To get around this you can sum all the values in a column using the following formula:

=SUM(COLUMN:COLUMN)

Which, in our example, would be:

=SUM(C:C)

NOTE You cannot place this formula in column C, or else Excel 2003 will show a circular reference error.

The formula must be placed in any other column, EXCEPT the one being calculated.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.