What is wrong with my excel formula syntax? - excel

I have made several formula to dynamically create a SQL query but to make it perfect, I want to add a condition : "if cell is not blank".
I've tried a lot of different syntaxe but even with a very simple one (see exemple below), I get an error.
My formula is :
="""" & SUBSTITUE(E2;"'";"''") & """"
It works well and give me "Accordéoniste d''hier"
I've tried
=IF(E2<>"";"""" & SUBSTITUE(E2;"'";"''") & """";"")
Excel display #NOM? in the cell but doesn't give me an explicit error.
I've tried a very simple one, but I get the same result : #NOM?
=IF(1=1;"Delivered";"")
I've tried ISBLANK but same result... I think there is something wrong and I don't see it...
Thanks for your help !

#rory is totally right. It looks like your Excel is in French, so you need to use SI instead of IF.
Excel works with local formulas, so you need to know the name of the functions in whatever language Excel has been set up.
Stack Overflow always post answer in english, and sometimes users like me need the translation of a function to their native languages. There's a trick to get the name of a function in a specific language I've used hundreds of times and it works pretty good with Stack Overflow.
Let's see your case. You see the solution is using the function IF and you need to know how is called that function in your language.
Of course there are several sources in Internet where you can check, but I like to use this one:
Google for the function in english, using words Excel Function. Always use the link that starts with https://support.office.com
Using that link will take you to the official documentation about that function, in english, but check the URL, the part of the language (in image it says en-us)
Change en-us for the initials of the language you want to see, and navigate to that new url. I don't know all of them but some of them are fr-fr for french, es-es for spanish, pt-br for portuguese (brazilian), pt-pt for portuguese, de-de for german, and so on.
In your case, you want in in french so replace en-us with fr-fr and you will see the name of the function in french. Same works for ISBLANK and other functions.
There you go. Now you know the name of the function in french, and you can apply it to your needs. This trick works for all functions documented in Excel. Hope it can help other users.

Related

Simple IF STATEMENT on excel never works

For the first time i was trying to use the IF statement on excel, and it seemed really simple to use, but for some reason even the most basic statement never works.
Example : =IF(A3=1;"Yes";"No") give no result as shown as #NOM?
I checked my regional settigns and my separator is ";", no doubt of it.
Anyone have an idea ?
The error
Are you using french Excel?
Then you have to use SI instead of IF.
This page helps to translate the formulas: https://fr.excel-translator.de/

Turn off Excel AutoTyping/AutoCasting for ever

If I load a CSV into Excel with the area code "DEC10" in it, it becomes a date automatically. If I then explicitly cast it to text it becomes 40513. I have many more examples like this. Does anybody know how I can get control of my own typing? I am not interested in a solution for this particular example or a work around for certain cases. I want Excel auto typing switched off for ever, for every file. So only if I say the cell is of a type Excel is allowed to cast it. Does anybody know how to accomplish that?
I am asking on stackoverflow because this is exactly the type of functionality that software developers would hate.

Error using concatenate

I try to merge text with date in a single cell. I looked online and I found the following options:
=G5&TEXT(F5;"DD/MM/YYYY")
And
=CONCATENATE("ZIMMERMANN U-4600 ";TEXT(F5;"DD/MM/YYYY")).
Unfortunatelly , nothing works, although in the other forums everybody was happy with the result. I get a #VALUE! - error.
I played around with the formatting and the languages of windows while giving in the code but nothing helped.
The code has ; instead of , due to the fact that it is a european office-package (and it doesn't work with "," either).
I suspect the #VALUE! error is coming from the TEXT(F5;"DD/MM/YYYY") part. Do trying it alone in a cell as =TEXT(F5;"DD/MM/YYYY"). If this also is resulting in #VALUE! error, then this is the case.
Unfortunately the pattern "DD/MM/YYYY" in TEXT function must be according to the locale settings of the Excel and the system the Excel is running on. In German Excel it must be
=TEXT(F5;"TT/MM/JJJJ") for example.
Have a look at Control Panel - Region what pattern is used for dates there. Then do using the same in TEXT function.
See TEXT function -> Other format codes that are available for another method getting possible format codes directly from the Excel.
This is a big disadvantage of the TEXT function if the Excel file shall be exchanged between different users from different locales.
Better approach then would be:
=TEXT(DAY(F5);"00")&"/"&TEXT(MONTH(F5);"00")&"/"&TEXT(YEAR(F5);"0000")
since the pattern 0 is locale independent.

List all functions that are called in Excel

Does anyone have a quick way/macro that lists all the functions that are used/referenced in an Excel sheet/worckbook ? Including addin functions (example : C#/C++ addin functions ).
Or, alternatively, a method that tells if a certain input function-name is called.
[Mods - feel free to delete this answer as it's essentially link-only. Perhaps I should know better, but I think this could be helpful to the OP]
I have a solution to this but it's proprietary so I can't release the source. However I'll describe the approach. It's not a quick way!
It's not easy to formulate a tokeniser for the Excel formula grammar. For one thing, you don't know the formula list in advance so you can't hard-wire them into the grammar. But the form of a formula in Excel is sufficiently well-defined to be able to tokenise it in a reasonably systematic manner.
Take a look at http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html. This shows you how to tokenise an excel formula. Once you have a formula tokenised, you can extract the function names.

how to display data that is related to a specific cell in excel 2010?

I have created 2 columns, the first has a category of a system using data validation, and the second has the description and failures of that system.
The purpose of that is to open a malfunction on some parts.
In a different sheet I wish to do the same only this time I want to choose the system and the description will automatically appear in the next column showing me all the malfunctions I have written on this system.
I am not very good at all the functions of excel. but I still searched for one that might help me. I have tried using the DGET function but it got me nowhere.
Perhaps try the solution here - it's a bit tricky to explain without copy-pasting the whole thing:
https://superuser.com/questions/536234/excel-how-to-vlookup-to-return-multiple-values
Also take a look at vlookup() if you're working across spreadsheets.
As expected, all of the responses you've seen ehere - and probably elsewhere - are ponyers to VLookup, or a refusal to answer your question.
I'm guessing that you're using DGET() because you need to retrieve data from one named column, using a match for a search term in another named column; and you're that because you can't rely on column ordinals or addresses - you have to do it by name.
VLookup won't do that for you: not without extremely complex and fragile array formulae.
The bad news is: Microsoft NEVER published a working example of a DGET() formula or any corresponding VBA Worksheet Function code.
There's page after page of descriptive text and general explanation in the helpfiles and on MSDN: but no working example. Nobody in Redmond ever sat down and made the DGET() function work with a reproducible set of function parameters and published a screen-shot the working formula.
I'll let you guess why that is.
Maybe there's an example somewhere that is, in effect, a VLookup implemented for known column ordinals using DGET(). If there is, I never found it and you won't either: and it would, of course, be useless for any application where you're working with field names instead of known ordinals.
What you need to do is capture the tabulated data range, with field names in the top row, and pass it to a SQL query using ADODB or MS-Query. That bad new for that is that all the MS-JET Excel drivers have a fatal memory leak.
After that fails, you're left exporting the data somewhere that a proper database app can run the SQL: and that's actually the right thing to do, because your attempt at using DGET() is a relational data query.
If you're left with the need to do this entirely in Excel, you have reached a level of desperation normally associated with the last survivor of an airplane crash who, having devoured the charred remains of his unlucky fellow passengers, is finally forced to contemplate the awful exigency of opening and eating the inflight catering meals.
The grisly details for the equivalent in Excel are a Horrible Hack published here:
http://excellerando.blogspot.com/2014/09/from-time-to-time-it-necessary-to.html

Resources