Excel formula without open worksheet - excel

I have one report which is all time updated and changed the file name. I want to know is it possible to make a formula (Except for Mecro code) to another worksheet without open this worksheet.
I am using indirect formula but it required to open worksheet.

Both of these sources indiciate that this cannot be done with a formula alone. However, they propose workaround solutions using vba code, as well as this stackoverflow answer

I strongly recommend to use PowerQuery. Though it uses M language, you can use it with GUI. If your version of Excel is prior than 2013, you must install the addon

Related

How to save Lambda formula as Excel Add-In (or how to easily convert to VBA function?)

I made some very complex Lambda formulas which I use frequently to validate UPC Check digits, and convert UPCs from UPC-E to UPC-A format
I tried to set them up as named ranges, then save the workbook as an Add-In, and followed all the steps I could find to add that add-in into my Excel, however it doesn't look like it keeps the named ranges at all (which is where Lambda formulas are stored)
Is there any way to get around this and still save these Lambda formulas as an Add-in?
I really don't want to have to re-create the entire complex formula in a module, but it seems I may have to do that in order to have the formulas available in every workbook I open
Alternatively, if there's any way within a VBA function for me to use my existing Lambda formula, I would love that, but I'm not sure if that is possible as I know that VBA is a quite different language than Excel's formulas.
I considered making a macro which instead would just add those named ranges to my workbook, but hoping for an easier solution.
Please let me know if you have any tips for this!
What about maintaining a Template,that’s what I do, means they are there in your new books and a quick way to access them for manual copying across to existing workbooks.
2nd idea is use autocorrect to store them with a shortcut word. Autocorrect is application level and there is VBA you can find to copy your AC shortcuts to a backup workbook and reimport them if your PC crashes.

How to copy content from a excel table to another worksheet

I have a table (named as Logs) in Sheet1 to which I am writing through a program. I need to copy the content written to the table Logs to Sheet2 as LogReport when I open the workbook. Is it possible to do this without using macros or Power Query option in Excel. I am working with Excel 2010. I have been searching for a while, but I was unable to find a solution which match the requirement.
Looked through the functions available as well, but I was unable to find a possible solution. Appreciate if I can get some help.
"Is it possible to do this without using macros?"
If under "macros" you mean VBA then the answer is No.

What is the simplest way to use a formula to detect if google sheets or microsoft excel is running, and execute the compatible formula accordingly?

Some formulas I'm using only work in Microsoft Excel but not Google Sheets, or a different formula that has the exact same result works in Google Sheets but not Microsoft Excel.
Is there a simple way to detect if Google Sheets or Microsoft Excel is running, and execute the compatible formula accordingly?
I am finding it difficult to believe this question hasn't been asked before but I couldn't find my specific question of the same file working in both Excel and Google Sheets.
I'm not concerned about scripts, just formulas.
There is no official way to determine if Microsoft Excel or Google Sheets is running through formulas, however with some versions of Excel =INFO("RELEASE") will return the version of Excel running, but this doesn't work in Google Sheets.
Thanks to #Slai, =ISERR(-"1pm") results in TRUE in Excel and FALSE in Google Sheets. Excel doesn't understand how to apply math to a time string value, where Google Sheets does, hence the error.
A simple IF statement using this logic can be =IF(ISERR(-"1pm"),"MS-Excel_formula","G-Sheets_formula")
If the formula you're using returns a number, a more simplified version is =IFERROR(GoogleFormula+"0am", ExcelFormula) however this won't work for non-numeric returned formulas because it adds 0 to the result which should not change a numeric result. For instance, =IFERROR(1+"0am", 2) returns 1 in Google Sheets and 2 in Excel.
If Microsoft decides to recognise "1am" or "0am" as numeric time values in future versions of Excel, the above if statements won't work as intended and Excel will attempt to execute the Google Sheets formula.
One boolean solution is to force an error in a function you absolutely know doesn't work in one or the other program. So #Slai 's example would work well no? Also, excel doesn't attempt to implement the Google only functions like ArrayFormula or Importrange &c. FWIW The minor discrepancies are the ones that catch me out - 'DSUM' for example frustrates me in that Google Sheets responds slightly differently to the Excel implementation under certain conditions. There will be others I'm sure but I've not yet found a definitive list or collation thread of these. (PS. I've not expanded my description of the DSUM idiosyncrasy as I suspect it'll be too far off topic).

In node.js, how to evaluate formulas in excel that contains reference to cells from another sheets in same workbook?

I have an excel sheet that contain multiple formulas. Formulas refer to cells from other sheets in same workbook.Is there any npm package that can evaluate formulas having references of cells from other sheets?
I am trying to do the same thing right now.
My attempt includes:
xlsx - to read values and functions from the file
hot-formula-parser - to evaluate functions
This library will fire an event each time it tries to evaluate a cell reference.
See callcellvalue documentation for more information
Also see callrangevalue documentation for more when range is required
This should suffice to implement the solution.
Let me know how it works and share your work :)
I will also share mine if I get it working.
Update
So turns out the library [hot-formula-parser] does not officially support cross sheet references. See more info at this ticket
However, I opened a PR for them to support it. Currently available at my fork
I am also working on a library that will enable you to point to a cell, and it will evaluate it. So even if it points to other cells which are formulas, it will recursively evaluate them. Let me know if it is of any interest to you.
Another Small Update
I was able to finish a POC that evaluates thousands of formulas along the way using the stack mentioned above and my PR.
I required some more patches along the way, but most of them can be worked-around if you can modify the excel file (for example, the name of the tab could not have spaces).

In excel, which function is similar to INDIRECT?

I have a large number of excel files that I need to use for getting data.
I am looking for a function similar to INDIRECT, in order not to be necessary to have the files open to get the values. Can you help?
Thank you
Consider using ADO..............here is a reference:
Microsoft ADO Reference
In your VBA, you need to first open the workbook:
Workbooks.Open()
Then you can use Workbooks("xxx").Worksheets("").Cells() or Range() [depending on what you want to do].
When you are done taking out the info/data, then you close that worksheet.
You don't really need =INDIRECT() or ADO or even VBA. Just reference the closed worksheet like this in a cell: ='S:\Temp\[T.xls]Sheet1'!$C$4
It will update the values upon opening the workbook; you don't need to have the source workbook open at all. Or you can update them manually by choosing Edit Links from the Data tab in Excel.

Resources