array-formulas

Calculate Moving Average in Excel

雨燕双飞 提交于 2019-12-19 04:18:52
问题 I want to calculate a moving average of the last, say 20, numbers of a column. A problem is that some of the cells of the column may be empty, they should be ignored. Example: A 175 154 188 145 155 167 201 A moving average of the last three would be (155+167+201)/3. I've tried to implement this using average, offset, index, but I simply don't know how. I'm a little bit familiar with macros, so such a solution would work fine: =MovingAverage(A1;3) Thanks for any tips or solutions! 回答1: {=SUM((

iterate row by row COUNTIF using ArrayFormula on Google Sheets

北慕城南 提交于 2019-12-18 17:35:11
问题 I am trying to iterate a COUNTIF formula that counts the number of cells in each row containing numbers greater than 4. I am trying to use ArrayFormula to do this but it isn't working. Unfortunately it counts ALL the cells matching the condition across the entire range B2:G39 resulting in 26 being entered in each row of column K rather than row by row count i.e. number of cells >4 in B2:G2 entered in K2, number of cells >4 in B3:G3 entered in K3 This is the formula =ARRAY_CONSTRAIN

Getting the count and unique values of a column of comma separated values?

假装没事ソ 提交于 2019-12-18 16:48:34
问题 Supposing all I have is the column A below + + A | B | C +--------------|---------|----------+ | | X, Y, Z | X | 3 | | X, Z | Y | 2 | | X, Y | Z | 2 + + How do I generate columns B and C - where the B column grabs the unique elements from A, and the C column generates a count of those values. 回答1: =ArrayFormula(QUERY(TRANSPOSE(SPLIT(JOIN(",",A:A),",")&{"";""}),"select Col1, count(Col2) group by Col1 label count(Col2) ''",0)) QUERY function TRANSPOSE function SPLIT function JOIN function 回答2:

ArrayFormula is breaking the getLastRow() funtion. Possible workarounds?

我的梦境 提交于 2019-12-17 17:16:23
问题 In my spreadsheet, I have a running script, which is using the getLastRow() function as an essential part of its logic. Ever since I applied the array formula in one of my columns, the getLastRow() function doesn't work properly. It seems that the array formula is "applying" all the way to the bottom of the sheet even when there are no other values in the other columns and thus, getLastRow() is returning the last row where there is an array formula, instead of the actual non-empty row.

ARRAYFORMULA() does not work with SPLIT()

时光总嘲笑我的痴心妄想 提交于 2019-12-17 15:57:10
问题 Why doesn't the split formula get expanded over the entire column when I use =arrayformula(split(input!G2:G, ",")) ? I get result only for the input!G2 cell, but not the rest in the G column. Other formulas like =arrayformula(find(",", input!G2:G)) seem to function and get expanded without problems. 回答1: SPLIT applied to a vertical array does, now, work. (Jan 4 2017) =ArrayFormula(SPLIT(input!G2:G,",")) or for error masking =ArrayFormula(IFERROR(SPLIT(input!G2:G,","))) Note: the resultant

Why is the MATCH function not working how anticipated in Excel with array formulas? (example attached)

时光总嘲笑我的痴心妄想 提交于 2019-12-14 03:29:01
问题 File Located Here (using Google Drive) Explanation and background: I have a list of animals and their color in column G (animal) and H (color). I have a list of the unique colors in column A, and a list of unique animals in column D. In column B, next to the list of unique colors, I need to know of all the animals, which animal has that color most often (raw number, not proportion.) I cannot use any additional helper cells. I have established the max by animal for each color with the formula

Array formula and MAX

依然范特西╮ 提交于 2019-12-13 08:56:27
问题 I'm trying to get peak/max equity from two columns A & B with an array formula. The reason I use the array formula is because I don't want just MAX as an answer in one cell. I want it to update automatically row after row with each new entry without overwriting previous entry. So far I got to this formula, but it gives me the same result in each row. =ArrayFormula(if(AD3:AD="","",MAX("<="&row(AD3:AD),AD3:AD,AB2))) And for clarification I would like it to look something like this: AB AD PEAK

How do I search across sheets in Excel

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 05:01:59
问题 I want to transfer data automatically from 2 sheets to one single combining one. That means I have 2 different exports that contain both the columns "Problem". I have one sheet, that represents an overview of the data. So when I have for example the value "A333" in A1 of my overview sheet, I want Excel to search in the two other export sheets the value "A333" and give back the value in the same row as "A333" but of the column "Problem" not "A" . The problem that I see is that I have to search

Dynamic subtraction in Google Spreadsheet

拥有回忆 提交于 2019-12-13 03:58:01
问题 Please have a look at my spreadsheet: https://docs.google.com/spreadsheets/d/1K5Btg5fFS590G7vZsFiepY-2VTPhzJIlkKK_o-9Ag7E/edit?usp=sharing How do I get: C2 to show Start weight (i.e. "100,0") C3 to show C2 - Daily weightloss (i.e. "99,7701") C4 to show C3 - Daily weightloss (i.e. "99,5402) C5 to show C4 - Daily weightloss (i.e. "99,3103") ...and so on. The challenge is obviously to do this dynamically since all the user-submitted data, and consequently, all the calculated data might change. I

Google sheets - VLOOKUP inside ARRAYFORMULA

这一生的挚爱 提交于 2019-12-13 03:24:24
问题 I am trying to do Vlookup inside an Array formula in Google Sheets. I have two sheets, S1 and S2. Each has 3 identical columns, Col A (Date), Col B(Name) and Col C(Payment-Type) I would like to read the payment type from sheet 2 into sheet 1 based upon date and name combination match. Meaning if the date and name matches in sheet 2, return the Payment Type. Here is my Vlookup formula, =VLOOKUP(A2,FILTER('S2'!A2:C7,'S2'!A2:A7 = A2,'S2'!B2:B7 = B2),3,FALSE) Above formula explained: S1 is sheet