sumif doesn't run "not" when cell is blank - openoffice.org

I'm trying to summarize cells where field is not a given value. This works in Google Docs and MS Office, but in LibreOffice and OpenOffice it only summarizes when the call has a value.
If E7 (see attached image) had a value of foo, LibreOffice would summarize that row. Why doesn't it run on blank fields as Google Docs does?
=SUMIF(E7:E1000, "<>Foobar", B7:B1000)
What do I need to do to have it work in LibreOffice as well?

Use SUMPRODUCT instead. It is more powerful than SUMIF, although it is less intuitive.
=SUMPRODUCT(E7:E1000<>"Foobar", B7:B1000)
See https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=49026 for a discussion.

Related

how can I write a formula that uses a cell's contents when building a range reference to the name of another sheet?

I have a large Google Sheets spreadsheet that has individual sheets for financial statements of activity for multiple years. I want to reference particular columns of those in other sheets, and I've successfully figured out how to do that with an HLOOKUP function. However, because I want to do this for multiple years, I'd like that HLOOKUP function to pick up the name of the sheet to reference from its column header. Right now, I'm hard-coding it like this—you can see the HLOOKUP range refers to cells in the "2021 Overall" sheet. The hard-coded approach works but makes adding a new year tedious. Ideally, the HLOOKUP formula would read the contents of its column header cell to determine which year it is.
As best I can tell, the solution is to use INDIRECT, but I can't figure out any way to build the formulate with INDIRECT and not get an error. For instance, this seemed like it should work. As you can see, I have 2021 in cell D4, and my INDIRECT statement is referencing that and building the rest of the range.
I've also tried using INDIRECT with an explicit CONCATENATE, with no more success.
Any ideas for how to look up that D4 cell and slide it into the HLOOKUP range?
Thank you!
Try to remove the "'"& before D4 and the ' after the Overall.
Your formula should look like this:
=IFERROR(HLOOKUP($A$2,INDIRECT(F4 &" Overall!$A$5:$X$150", Utility!$A10, FALSE)))
With Nikko's nudges in the right direction, I eventually figured out the right format. This allows the formula to work in multiple sheets and to be filled right (for more years) and down (for more classes).
=IFERROR(HLOOKUP($A$2,INDIRECT("'"D$4&" Overall'!$A$5:$X$150"), Utility!$A3, FALSE))
Note that if you try to replicate this, you may need to type the formula out from scratch—I had a problem where pasting it in didn't work. Once I'd retyped it and Google Sheets acknowledged it, it worked from then on in the spreadsheet, even when pasted from sheet to sheet.

How can I concatenate and transpose two ranges of cells in Google Sheets?

I have a Google Form linked to a Google Sheet. It has a number of questions with responses that I need grouped into specific columns. I also need to keep the columns in the order they're in.
I was working with a formula someone helped me with to do one single range:
=ARRAYFORMULA({"Job Responsibilities";IF(A2:A="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(H2:V),,100))))})
However in the instance I am having problems, I need to group together the answers that are in columns W - AK and also BA - BO into one cell.
I tried something like
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(W2:AK)TRANSPOSE(BA2:BO),,100))))})
or
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(W2:AK, BA2:BO),,100))))})
But that makes an error.
Is there another modification I can make to concatenate and transpose the values in these cells?
Here is a link to a Google Sheet showing most of what I'm referring to. It's from an earlier iteration, so it's not 100% exact with what I said above, but the goal is still the same. In this Sheet, I would like to concatenate what's in Columns U - AG and AU - BF.
Update, based on the data in your sheet:
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY({TRANSPOSE(U2:AG);TRANSPOSE(AU2:BG)},,100))))})
Try:
=ARRAYFORMULA({"Supporting SAP Stream";IF(!B2:B="",,TRIM(TRANSPOSE(QUERY({TRANSPOSE(W2:AK); TRANSPOSE(BA2:BO)},,100))))})

Google Sheet Array Formula to automatically transpose responses from a Google Form into a single cell

I want to tweak an Array Formula that I'm trying to use to transpose a set of responses from a Google Form into a single 'list' in a cell in the linked Google Sheet.
Here is a simplified mock-up of the Google Sheet: https://docs.google.com/spreadsheets/d/1BKgjGK2RbXC5FkCgBOU53dLEb3fDeQADujenrqRgnT0/edit?usp=sharing
As you can see, I have a working Array Formula 'hidden' in the header for Column A, which takes the content from columns B:K in each row and transposes them with line breaks to make a nice neat list in the first cell at the start of each row (A2, A3, A4, etc.) Here is the Array Formula for ease of reference:
=ARRAYFORMULA({"Points to Develop";
transpose(query(transpose ($B$2:$B&CHAR(10)&$C$2:$C&CHAR(10)&$D$2:$D&CHAR(10)&$E$2:$E&CHAR(10)&$F$2:$F&CHAR(10)&$G$2:$G&CHAR(10)&$H$2:$H&CHAR(10)&$I$2:$I&CHAR(10)&$J$2:$J&CHAR(10)&$K$2:$K)
))})
The problem I'm having is that the formula stops working as soon as a new Google Form is submitted, as the new row of responses arrives at the top and 'pushes the formula down'/throws everything out of alignment, when all I want is for it to stay in place and run automatically every time a Form is submitted. As you can probably gauge by my limited technical terminology, I'm very much a novice at this!
How can I fix this formula, or is there a simpler or better alternative that will achieve the same results?
As often happens in life, the nature of the problem turned out to be the source of the solution. Here’s a condensed version of my thoughts as I slowly found my way to an answer (you can almost hear the hamster wheels turning in my head!):
The problem with formulas in a Google Sheet linked to a Google Form is that each new entry/submission from the form always arrives in Row 2 …
In fact, the only thing that stays ‘in place’ in the Google Sheet is the Header Row/Row 1 …
So, rather than using a formula that refers to a ‘Row 2’ that will become ‘Row 3/4/5/etc.’ as new Google Forms are submitted, I should use a formula that always refers to Row 1, that is, by using OFFSET
The obvious (if inelegant) formula that resulted from this is [I've also placed this in the final column in the Google Sheet that I linked to in my original question]:
= ARRAYFORMULA({"Points to Develop [Working OFFSET Formula]"; transpose(query(transpose(OFFSET(A1:A,1,1)&CHAR(10)&OFFSET(A1:A,1,2)&CHAR(10)&OFFSET(A1:A,1,3)&CHAR(10)&OFFSET(A1:A,1,4)&CHAR(10)&OFFSET(A1:A,1,5)&CHAR(10)&OFFSET(A1:A,1,6)&CHAR(10)&OFFSET(A1:A,1,7)&CHAR(10)&OFFSET(A1:A,1,8)&CHAR(10)&OFFSET(A1:A,1,9)&CHAR(10)&OFFSET(A1:A,1,10)))) })
I am sure that there are neater ways of getting to the same result, but this is one that works for me … and is within my levels of comprehension, so I can fine-tune and fix it as needed.

Does Google Sheets have "Volatile" Functions like Excel?

In Excel, Vlookup and Indirect are notorious examples of Volatile Functions in which there is an unnecessary amount of recalculations every-time you edit a cell (even if it does not change the output). Is there a list of volatile functions in Google Sheets and is there any documentation warning about its use or is this not the same type of problem?
Update: Vlookup is not officially volatile in the latest version of excel but it did used to cause (haven't checked recently) recalculations when editing cells that could never change the output due to poor optimization.
Part of this question asked if there is any documentation listing which sheets formulas are volatile. I couldn't find any list from Google. (There are lots of 3rd party sites such as Ben Collins which provide a list, but no source is given). The only Google Documentation I could locate to confirm functions' volatility was to review the full list of Google Sheet's formulas. Unfortunately to fully check a formula, one has to click within the detail of each individual formula and check in the notes:
I cross-checked the Excel formulas that Microsoft lists as volatile and it appears Player() list is correct (no surprise). What's interesting (to me) is that Offset and Indirect are NOT listed as volatile in google sheets. This can allow for some more flexibility with array functions and other references.
Side Note on OP Comments Regarding Vlookup
OP asserts that vlookup is a volatile function. This is not correct, as was shown in the Microsoft link. VLookup does calculate less efficiently compared to index/match and xLookup but a change in a cell outside of the vlookup range will not trigger a recalculation.
yes, Google Sheet does have volatile functions:
NOW
TODAY
RAND
RANDBETWEEN
RANDARRAY
COINFLIP
WHATTHEFOXSAY
and the only issue with them is that they are hard to be frozen
update
with the latest pack of new functions, all volatile functions can be frozen:
=LAMBDA(x,x)(RAND())
=LAMBDA(x,x)(NOW())

Copy cell formatting using Lookup formulae google spreadsheet

I am making a spreadsheet for my D&D game in google spreadsheets, and am having some trouble with a vertical lookup. I have the workspace set up such that the first sheet is a search sheet, and the second is a database sheet.
In the search sheet, you type in the name of a spell, and then using VLOOKUP formulae it retrieves the data from the database. That does work. However, it does not copy over the formatting.
One of the pieces of information copied over is the spell description. Inside this description, which is fitted all in one cell, I sometimes use italics to emphasize certain parts. The italic formatting for those few words is not copied over with VLOOKUP. I was wondering if this was possible.
I tried to google this problem, and found somebody else asking this not too long ago on the google forums, but there were no replies there. Hoping to have a bit more luck here.
Example
In cell Sheet2!A1 is 'Name', in Sheet2!C1 is 'Description with italics'
In cell B2 on the active sheet is the searchbar (filled with 'Name')
I currently retrieve the information using:
=VLOOKUP($B$2,Sheet2!A1:C,3,false)
This would return
'Description with italics'
I would like to get
'Description with italics' returned instead.
Partial formatting of cell content was introduced recently and has very limited support in Google Sheets. About the only thing it is good for is formatting of headers and other informational elements, like
| Invoices sent | Invoices not sent |
To save yourself frustration, I suggest using partial formatting just for that, and not for data.
Formulas do not preserve partial formatting, even the simplest =A1 removes it.
Scripts do not support creation of copying of partial formatting, either.

Resources