Say I have a long expression (i.e. with a lot of characters) expr. I want to give a cell the formula =if(expr&gt;10,expr,0) (this is an example, the condition could also be =if(iserror(expr),expr,0)). Although the syntax is very simple, the expression can be very long and tedious to debug.   Would there be a way to "map" a function to expr, something like =map(if(#&gt;10,#,0),expr)  (but of course # is not a appropriate) so that expr appears only once?  Edit Just to make the answer clear: it is not possible to map functions in such a way, using only Google Sheet's functions.
121286
I'm trying to create a formula in a Google spreadsheet which looks like this:  if (x &lt; 0, x + 1, x)   It means if x is smaller than 0, return x + 1, else return x.  However, x itself is an expression, e.g. A1 + B1. So I ended up with:  if ((A1 + B1) &lt; 0, (A1 + B1) + 1, (A1 + B1))   How can I save the expression (A1 + B1) into a temporary variable x such that I can do this? :  x = (A1 + B1); if (x &lt; 0, x + 1, x);   The current expression in my spreadsheet looks like this:  if(     timevalue(Sheet1!$D10)-timevalue(min(filter(Sheet1!$D$2:$D$99,Sheet1!$A$2:$A$99=A10,Sheet1!$E$2:$E$99=E10))))     &lt; 0,     1 +     timevalue(Sheet1!$D10)-timevalue(min(filter(Sheet1!$D$2:$D$99,Sheet1!$A$2:$A$99=A10,Sheet1!$E$2:$E$99=E10))))     ,     timevalue(Sheet1!$D10)-timevalue(min(filter(Sheet1!$D$2:$D$99,Sheet1!$A$2:$A$99=A10,Sheet1!$E$2:$E$99=E10)))) )   I'm trying to get it to look shorter and more manageable like this:  x = timevalue(Sheet1!$D10) - timevalue(min(filter(Sheet1!$D$2:$D$99,Sheet1!$A$2:$A$99=A10,Sheet1!$E$2:$E$99=E10)))); if(     x     &lt; 0,     1 +     x     ,     x )
16086
I've seen an equals sign with a small exclamation mark on top being used to say "equals because of data that was given in the problem", for example for a boundary condition or initial value in a differential equation.  A rough picture of what I mean:       ! f(x) = 4   How do I typeset this in LaTeX? I've tried $=^!$ (which doesn't produce the desired result) and looked through the "relations" section of the  without success.
26627
In , it seems that [[:digit:]] = [0-9] = \d.    What are the circumstances where they do not equal? What is the difference?  After some research, I think one difference is that bracket expression [:expr:] is locale dependent.
75347
As I use the client side to enforce various pieces of business logic with aura:if statements, I'm finding that a given formula operator cannot handle more than two parameters.  For example, this works:  &lt;aura:if isTrue="and(v.myAttributeString == 'Open', v.myAttributeBoolean == true)"&gt;     //do some stuff &lt;/aura:if&gt;   But the following does not work (or at least the third "v.myAttributeSecondString" is not evaluated):  &lt;aura:if isTrue="and(v.myAttributeString == 'Open', v.myAttributeBoolean == true, v.myAttributeSecondString == 'Yes')"&gt;     //do some stuff &lt;/aura:if&gt;   Has anyone seen the same effect occur? Any documentation on this? Am I crazy and this actually does work, just not for me?  Thanks!
27400
I am attempting to change the value of a cell in Google Sheets based on the value of an adjacent cell. This adjacent cell gets its value from the colour of the cell adjacent to it using the formula from  Quora answer. So the value of the cell should change based on the hex code which is obtained from the colour of the first cell. There are four possible hex values at the moment so I was trying to put four different IF statements in the same cell, so its value is changed based on this.   My first attempt led to a formula parse error:  =if((J2="#00ff00","Read"), if(j2="#ff0000", "Unread"), if(j2="#ff9900","In Progress"), if(j2="#000000", "Not Applicable"))   It is clear you cannot simply separate if statements with commas. Based on  Stack Overflow question I tried this code, with nested IF statements:  =if((J2="#00ff00","Read", if(j2="#ff0000", "Unread", if(j2="#ff9900","In Progress",if(j2="#000000", "Not Applicable")))))   This also leads to a formula parse error.   Is there any way I can simply include multiple IF statements in the same cell which will work for my code?
116734
Suppose I have a text string like "11+5" or even "=11+5" stored in a cell. Is there a function in Excel that will allow me to actually evaluate that string as if it were a formula?  This would be helpful for another project where I would like to be able to write 'dynamic' formulas in Excel.
23614
This question has bugged me for a while. I want to write a nested function, f(g(x)). If I naively enter it:  \begin{align}     f(g(x))=y \end{align}     The problem is that each and every parenthesis is the same size as all of the others. Shouldn't the outer parentheses be larger? But if I do this:  \begin{align}     f\left(g(x)\right)=y \end{align}     Now it looks even less like the functions are nested. What's the proper way to do this?
119101
I would like to create an expression using the field calculator in ArcMap to be able to convert an Int field to a string and add leading zeroes.  I am able to do it in a python window with an example  x=450 print str(x).zfill(4) &gt;&gt;&gt;0450   I have tried:  !Time!.str().zfill(4)   but that gives me invalid syntax errors.
72992
Let's say that I create a Sub (not a function) whose mission in life is to take the active cell (i.e. Selection) and set an adjacent cell to some value.  This works fine.  When you try to convert that Sub to a Function and try to evaluate it from from spreadsheet (i.e. setting it's formula to "=MyFunction()")  Excel will bark at the fact that you are trying to affect the value of the non-active cell, and simply force the function to return #VALUE without touching the adjacent cell.  Is it possible to turn off this protective behavior?  If not, what's a good way to get around it?  I am looking for something a competent developer could accomplish over a 1-2 week period, if possible.  Regards, Alan.  Note: I am using 2002, so I would favor a solution that would work for that version.  Having that said, if future versions make this significantly easier, I'd like to know about it too.
21288
It seems that   if (x=y) { .... }   instead of  if (x==y) { ... }    is a root of many evils.  Why don't all compilers mark it as error instead of a configurable warning?  I'm interested in finding out cases where the construct if (x=y) is useful.
96075
Here is a quick question, how to use tex to print this ' symbol? An example is shown below:  data 'a list = Nil | Cons (e, 'a list)   I tried to use ' or `, but they all looks bad.. I am sorry but I am not a native English speaker, so I don't even know the name of '..   Could anyone help me on this simple problem? thank you
18973
I need to write a function that receives a string and a regex. I need to check if there is a match and return the start and end location of a match. (The regex was already compiled by qr//.)  The function might also receive a "global" flag and then I need to return the (start,end) pairs of all the matches.  I cannot change the regex, not even add () around it as the user might use () and \1. Maybe I can use (?:).  Example: given "ababab" and the regex qr/ab/, in the global case I need to get back 3 pairs of (start, end).
35150
I have the following annoying problem with Excel 2010. I use Conditional formatting to apply bold formatting to each line of the spreadsheet that meets a condition expressed by a formula. In the "applies to", I write =$A$2:$Q$149, which is the current extent of my spreadsheet. But I want this range to grow with my spreadsheet, i.e., I want the formatting to permanently apply to the whole spreadsheet. Regularly, my "applies to" field is transformed into a complex range, that selects most lines of spreadsheet, but not all, like =$A$2:$Q$138;$A$140:$Q$147. Have you ever encountered such a problem? Is there a solution?
120809
So, I'm writing a mathematics paper, and let's say I have the following:  \begin{equation*} 2+2=4 \end{equation*}   Is this the proper way to do an unnumbered equation, or is it preferred to do the following:  \[ 2+2=4 \]   My question really is: what's the difference between doing \begin{equation*} and \begin{equation*} versus doing \[ \]? Is there a setting in which one may be preferred over the other?  Thanks in advance.
51682
I have a spreadsheet I'm sharing with others to collect some data. Each person is just (supposed to be) putting a single character in any of a range of cells.  How can I cause those cells to convert to uppercase?   Using =UPPER() in each cell would seem to be a non-starter, because it'll be overwritten by whatever they enter.
25015
This is the problem I'm seeing:      Error - Unable to parse query string for function QUERY parameter 2: NO_COLUMND     The formula is of the form:  =query(importange("...", "Sheet!A:V"), "select D where V = 1", 1)   I imported data from another sheet, I want this current sheet to display column D when Column V is 1.  Is there a different way rather than my current formula?
115952
I stumbled upon those two ways of writing a mathematical expression inside a text:    I could easily do the first one by writing the expression inside $s, but what about the second one? If I use \begin{displaymath}, it looks like this:    What is the correct command for this?