2022 Developer Survey is open! Take survey.
4 votes
Accepted

Formula for matrix (dates in descending order)

3 changes, those in red/bold :
user avatar
  • 688
3 votes
Accepted

Formula for matrix (dates in ascending order)

I know you are looking for an Google App Script answer, but I have a formula: =IF($B2="Apple",A2-SORT(FILTER(A:A,B:B="Pear", A:A<$A2),1,FALSE),"") This formula goes ...
user avatar
  • 365
2 votes

Formula for matrix (dates in ascending order)

For completeness ,building up On David's answer, since I wanted to use it in App script as asked in the question, here's the declaration that works fine const cell = sh.getRange(`C:C${sh.getLastRow()}`...
user avatar
  • 199
2 votes

SWITCH statement in Google Sheets Doesn't Compare Strings Properly?

SWITCH function in google sheets. The switch function uses the following syntax: SWITCH(expression, case1, value1, [case2, value2, ...], [default]) So remove your extra D2 in the function and it ...
user avatar
  • 365
1 vote

Flattening the values (not formulae) of a summary sheet

Instead of chain of formulas of the form =if('A CAM'!A1,'A CAM'!B1,"") try a single formula using FILTER function: =FILTER('A CAM'!B1:B100,'A CAM'!A1:A100)
user avatar
  • 41.7k
1 vote
Accepted

Google sheet, from 2 lists to flattened table

See my comment to your post above for a tip regarding future posts. That said, suppose that your "A" from the first image is in cell A2 and your "1" from the first image is in cell ...
user avatar
  • 4,442
1 vote
Accepted

Match value of cell if in between range and text match

You can now check out the sheet: It is possible but you have to make some changes to the data placement for it to work. Also the number should not have the string '£', but instead apply a number ...
user avatar
  • 136
1 vote

COUNTIFS in Google Sheets

Isn't that difficult ! :) Try: =COUNTIFS(A2:A,">="&B2 , A2:A,"<="&C2 )
user avatar
  • 688
1 vote
Accepted

Formula to get the data from a source and use it while leaving some defined patterns as spaces

I'm not sure whether this answer your question, but I think this should do it. https://docs.google.com/spreadsheets/d/1QZJODzDyA8RgM_Skh0Kor7O1r4-7dtmU1eROtAfIwzA/edit?usp=sharing =IF(MOD(ROW()-1,5) = ...
user avatar
  • 365

Only top scored, non community-wiki answers of a minimum length are eligible