I am trying to implement a function in google sheets that will provide the max value from a set of values in column B based on the corresponding checkbox in column C.
I was able to get the sum to work using:
=sumif(C3:C7, TRUE, B3:B7)
However, I am not having any luck finding the max value of the set.
try MAXIFS
=MAXIFS(B3:B7, C3:C7, TRUE)
or you can FILTER it:
=MAX(FILTER(B3:B7, C3:C7=TRUE))
Related
I want to always have the current Row number in this formula:
=ArrayFormula(IFNA(match(2,1/(A5:5<>""))))
The ROW() function works for getting the current row number. How can I implement it into this ArrayFormula() like this? I imagine it working like this but it doesn't:
=ArrayFormula(IFNA(match(2,1/(A&ROW():ROW()<>""))))
How do I pass the value of Row() into the ArrayFormula() function?
this is not an arrayformula issue...
constructed range always needs to be INDIRECTed:
=ARRAYFORMULA(IFNA(MATCH(2, 1/(INDIRECT("A"&ROW()&":"&ROW())<>""))))
Before y'all tell me to search please look at the formulas. I have searched and tried all variations mentioned in the docs. The spreadsheet is dead simple. I am trying to populate the driver name cell based on previously recorded license plates. Why is this not working as the docs show? The result with in B11 should be 'Billy Goats'.
Formula with no final value specified (should default to TRUE).
Formula final value sorted set to TRUE, still not working.
Formula final value sorted set to FALSE, still not working.
I am not looking for someone to fix my problem. I just want to know why this is not functioning according to the docs. I am trying to learn, not get free scripting services.
use:
=VLOOKUP(F11, {E1:E10, B1:B10}, 2, 0)
I have a table I designed on a 'react-table'. I want to sort according to the checkboxes I marked on my table. For example, when I press column name, the true ones should be listed first. I'll be happy if you can help me.
picture of the error (true values should have been first or false values by choice)
The other solution works, but it's not necessary.
I got stuck with this as well, until I realized that one can set sortType: 'basic' (which is one of the built-in sorts of react-table) and it will sort the boolean column properly.
The reason that sorting a boolean column doesn't work out of the box is because the default sorting is set to alphanumeric.
After some more research, I learned that it can be done with sortType. We can sort the boolean values by adding this code to the relevant column.
sortType: ((a, b, id) => {
if (a.original[id] > b.original[id]) return -1;
if (b.original[id] > a.original[id]) return 1;
}),
I'm not sure what I missed as my arrays are not working. Here's the link:
https://docs.google.com/spreadsheets/d/1_pPSRjEnKv10mDR8LICVvVv7jgXVBJ1aWZ8KrdEIKd4/edit#gid=0
Please check highlighted in green.
Thanks
Im not sure how to explain why it doesn't work because there are a list of things - various ways in which array formula operates - but I would like to suggest to you to use regexextract instead of search: I created the two formulas for is profile and is live, hopefully I can try to explain what the pieces do:
in column Y:
=arrayformula(if(arrayformula(if(istext(regexextract(C2:C,"automated")),1,0))+arrayformula(if(or(istext(regexextract(C2:C,"clinic profile")),istext(regexextract(C2:C,"dr profile"))),1,0))=2,1,0))
in column Z:
=arrayformula(if(Y2:Y=1,if(istext(regexextract(C2:C,"live")),1,0),0))
Basically instead of using the search - regexextract will find your search terms anywhere in that text and it works well with array formula, then using the if and istext to give it a true of false value of 1 or 0.
if the value is not found in that corresponding cell, it would in theory return #N/A if it was in an individual cell - but if the value is there the regexextract would return that value to you, which why the istext works
By the way if Im confusing you , then if you want to change your sheet to be editable by anyone I can jump in and show you what I did..
I am beginner in of AngularJS therefore I have a simple question.
Is there any method provided or sample code in ui-grid to check the duplicate values in more then one rows in ui-grid.?
i want to color the cell where duplicate value exist.
There is no TRUE built-in way, however using $watch is one solution. If values in your ui-grid are bound to a variable called myGridVals, you would do something like this:
$scope.$watch('myGridVals',function(newval,oldval) {
// loop through myGridVals and see if newval matches anything
});
Note that if your array holds objects you'll want to do a DEEP watch which means adding a third param to $watch(..,..,true);
You can also