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