I want to reference an external workbook that is open. If I type =path\[file] directly into the cell (even though I am still asked to 'Update Values',) I am able to get the data I require. However, I am using INDIRECT because the name of the file changes everyday (date). So, I am using CONCATENATE to create a filename daily and then using INDIRECT to the cell where the concatenated formulas is. If you paste values to see what is being generated formula, it is exactly the same formula as above, =path\[file]. However, I continue to only get #REF! error.
I read through this, https://support.office.com/en-us/article/control-when-external-references-links-are-updated-87861952-ca9d-4d2a-a986-4d672c908d0d, and I still can not figure it out. I had it working on my computer at home last night but today and work it is giving me trouble.
To clarify, the formula that I am trying to get to work looks like this =INDIRECT("'"&CONCATENATE($F$129,$F$130,F95)) which worked yesterday at home. Can someone lead me in the right direction?
EDIT:
I have tried two options, =INDIRECT(F121) and =INDIRECT("'"&F121). The contents of F121 have been =CONCATENATE("'",F191,F192,F157) and =CONCATENATE(F191,F192,F157), respectively. I have also tried =CONCATENATE("'",F191,F192,F157) in the destination cell. F191 = [Liquidity Risk Dashboard v2.03 -, F192 = =TEXT(E3,"yyyymmdd")&"]", and F157 = Calculations'!D122. If I write ='[BMI Liquidity Risk Dashboard v2.03 - 20170105]Calculations'!D122 am asked to update values but, 100% have both workbooks upon in same instance
If I understand what you really have in your cells, the problem is that you are not properly naming the source workbook.
Try changing
F192: =TEXT(E3,"yyyymmdd")&".xlsb]"
Replace .xlsb with whatever the file extension really is for your file. (eg: .xlsx, .xlsm, .xls)
Related
Issue: As the title says, any time a LAMBDA formula is used in my spreadsheet it forces all other users who have the shared spreadsheet open to reopen the spreadsheet.
With my brain's limited capacity, I am struggling to find anyone else struggling with this issue in any google search I've tried.
What I've tried: I've tried several methods to get the formula into the needed cells (thinking perhaps it was a macro that was breaking things) - regardless if I'm typing, copying/pasting, using VBA to write the cell contents, as soon as the cell contents are "locked in" every other user is forced to reopen.
Is this a known issue (that I just suck at googling) or "feature"? Has anyone else experienced this and/or found a workaround?
For use-case, and how I have things structured, I've included a link to a "neutered" spreadsheet that can be downloaded (making it live might break it as soon as someone else makes changes something, and I wouldn't have any way to ensure everyone has an original copy to look at)
https://www.dropbox.com/s/35gbt7shulx5ckt/PFab%20-%20error%20reproduction.xlsx?dl=0
In the O-T columns I would place the formulae =orderDate or =customLead(numberOfDays) (where "numberOfDays" is an integer entered, not a formula). Either of these will force the spreadsheet to reopen for other users.
Here are the custom formulae I'm using:
orderDate =IF(SFD="","",recurse(sub,daysOff))
SFD =PFAB!$A16 (row changes depending on cell selected)
recurse =LAMBDA(x,y,IF(OR(x=y,WEEKDAY(x)=1,WEEKDAY(x)=7),recurse(x-1,y),x))
sub =LAMBDA(x,y,IFERROR(x-y,TODAY()))(SFD,leadtime)
daysOff =OFFSET(daysOff!$A$1,,,COUNTA(daysOff!$A:$A),1) (dynamic range with stat holidays)
leadtime =INDEX(LeadTimeTable[Lead Time],COLUMN()-14) (row of table selected based on column formula is in)
customLead =LAMBDA(numberOfDays,recurse(SFD-numberOfDays,daysOff))
I am having a weird problem with my excel sheet. It is because I have been trying to use the Index(range;Match();column()) to extract information from a big data set.
The problem is that the above formula, when I apply into one sheet, then it shows #REF. But if I copy/paste or connect the data to another sheet and run the index(match()) command there, then it works like it should. Does anyone have any clue what could be the error?
It is because right now I have a data set of almost 800 rows, and I can not connect it to a second sheet, since I dont want to overburden the file. So has anyone ever faced this issue before with their excel files?
I have used the exact method formula in the second sheet and it works. But it is this one sheet where the problem arises. I have been using vlookup() in the same sheet and it worked fine.
UPDATE
I have also uploaded the result now as well.
I have an Excel file on SharePoint.
Multiple people edit said file.
Offline and online.
Excel unfills all calculated cells (VLOOKUP and MATCH) that depend on other sheets in the same workbook at random.
So if you would open or reload that file, suddenly all the cells that use VLOOKUP or MATCH would be blank.
Upon further investigation nobody changed anything or deleted anything.
It just happens randomly.
Now it has happened 2 weeks ago and just today.
I have an interim solution that is to go to a cell with a formula, hit return, then click „overwrite all cells in this column with this formula“ and then click undo to prevent custom cell content to be overwritten.
Everything is back to normal afterwards.
I talked to a colleague, he has the exact same issue also totally at random.
He also encountered this on files that are not being edited by multiple people but himself.
So it is not dependent on the file itself.
Could the language play into this problem?
On some PCs Excel is in English and on some in German.
=IFERROR(IF(ISNA(VLOOKUP(D185,Sheet1!$B$3:$D$616,3,FALSE)),(VLOOKUP(D185,'Sheet2'!$B$3:$D$22200,3,FALSE)),(VLOOKUP(D185,Sheet1!$B$3:$D$616,3,FALSE))),"")
Seems like your sheet isn't calculating upon open. See if this link is of use to you.
https://superuser.com/questions/448376/what-is-the-excel-hotkey-to-re-calculate-all-formula-in-sheet
Also check your program settings and see if auto-calculate sheets is enabled. Don't know from the top of my head where it is located.
Alternative create a small vba function to force recalculate on workbook open.
Getting Excel to refresh data on sheet from within VBA
I've been saving Google Sheets to Excel without any problems for a while. These sheets have always successfully saved and opened in Excel with the importrange function. However, recently it hasn't been successfully saving correctly.
It used to just have the static value (e.g, 40). There used to be an IFERROR in the first cell in the header row but now it exists in every single cell.
E.g, each cell would have something like this:
=IFERROR(__xludf.DUMMYFUNCTION(importrange(blahblah)),"40").
DUMMYFUNCTION throws an error and "40" is returned as a result. but "40" is a string, not an integer which messes up all my formulas.
I also know this isn't an Excel issue because OpenOffice is doing the same thing with the file.
I'm pretty sure this would be a bug because why would it be working for months and then suddenly stop working?
What should I do?
I'm thinking it's a bug too.
Workarounds
On Excel
Copy and paste as values only the ranges with IFERROR(__xludf.DUMMYFUNCTION(..., then use Excel's UI tools to convert numbers shown as text to numbers.
Selectively remove quotes on the IFERROR second argument of the cells causing problems
Remove =IFERROR(__xludf.DUMMYFUNCTION(),"value") except value (we could use Excel's built-in FIND & REPLACE for this)
On Google Sheets
Use Copy > Paste as values only on the range areas having formulas with non-compatible functions like IMPORTRANGE, QUERY, FILTER, etc.
If you only need the values, download it as CSV instead of XLSX
IMPORTANT
In order to help to prioritize this issue, send feedback to Google. To do this open a Google Sheets spreadsheet, click on Help > Report a problem, then fill the feedback form and submit it.
Related stuff
I posted 5 small articles about this in Spanish. You could find them listed on https://www.rubenrivera.mx/p/descargar-hcg-excel.html.
We accidentally created a workaround for this bug with a different sheet that was just set up like this.
This works when you IMPORTRANGE into another Google Sheet. We are doing it into a Google Sheet with a single worksheet - haven't tried it with multiple.
It's going to sound a little nuts but it works for us.
In the first cell of your import range put a hyperlink in the original document you are importing from. This is in the first cell of the import range. We linked it to a worksheet in the original document. It has worked and failed with an external link. With an external link it worked when I linked it to an internal link, then changed it. But when I deleted the cell and just straight linked it to an external URL it didn't work.
Then #timbo was right - put data validation in. This can be in part of the document that isn't being imported into the second sheet. I put it in the first line of the import range but outside what I was importing. It might have to be the first line. I just put a date in one cell, then in the next cell data > data validation > then choose that one date as the data range.
For aesthetics I have hidden the first row in one Google Sheet I am importing into. In another I made the first cell link the title of the sheet and put the data validation outside the import range. Both of these work.
Let me know if this works for you.
Until this bug is fixed, a workaround is to put a data validation (Data > Data Validation) on the imported data (Any kind of data validation will do).
I've got a collection of about 40 Excel worksheets. They store information about the number of hours that people have spent working on different projects, with dates across the top row from left to right and project names down the first column. Each member of the team has their own separate worksheet.
I'm making a new worksheet that will add up the number of hours each person has spent on a specific project.
I'm using this formula to add up all the numbers in a particular range of a linked file:
SUM(INDEX('S:\path\to\folder[Username_2017.xlsx]Daily'!G:JG,JOB_ROW,0))
JOB_ROW is the row containing the numbers I want to add up. Columns G:JG cover 1 Jan - 31 Dec. Username_2017.xlsx is different for each of the 40 people.
The problem is that the formula only works if I create it by hand. I can't find any way to use a dynamic reference to the filename, which gets very tedious with 40+ files to reference. I thought this might work:
SUM(INDEX(INDIRECT(C3),JOB_ROW,0))
...where C3, C4, C5 etc. would contain automatically-generated filenames and references. But it doesn't work. I get #REF!. And Excel doesn't prompt me to link the files -- which suggests to me that it will never work this way.
I've also found that even when the spreadsheet is working properly with the manually-entered formulae, if I save it and re-open it then Excel tries to be helpful by stripping out the formulas and replacing them with the text #REF!.
Is it possible to do what I'm trying to do? Or do I need to learn some VBA?
I should point out that I've largely avoided using Excel in my career so far -- so if there's a better way to achieve this then I'd love to hear it.
Thanks in advance for your help.
ian0411 gave the simple answer to this question in the comments above: the answer is "you can't do that".
If he wants to post that then I'll accept it as an answer -- but for the benefit of anyone else reading this question and looking for alternative options, here's what I tried and what worked:
VBA
I wrote some very simple VBA using GetObject() to open and read from each of the workbooks. It worked, but a) it was very slow, and b) it seemed to keep all the files open as long as Excel was running, which caused other problems. It also crashed a lot.
I gave up on VBA.
Automating the filename replacement
The next option I tried was to have a column of filenames in Excel, with a column next to it containing the formula that I wanted to run on each file. Instead of putting the linked filename in the formula, I put a unique placeholder ('XXXXX' or whatever).
Then I made a little macro that (for the currently selected row) did a search and replace across the row to change 'XXXXX' to the filename in column A. I had to run the macro 40 times to cover each file, but I only had to do that process once. When I add a new file to the list, I'll just add a new line, copy the formulas, and update the filename.
I've now got a spreadsheet which works perfectly when the linked files are closed, and which doesn't rely on VBA.
Perhaps if my VBA skills were better I could have written something less flaky -- but doing it all with INDEX() seems like the fastest, most elegant, and most reliable solution.