I have this formula in Microsoft excel that when uploaded in the google sheet, it turns into zero and was transformed in array_constrain formula. Can somebody help me on this? Below is the excel formula that I used.
=IF(ISERROR(VLOOKUP(1,CHOOSE({1,2},--EXACT($A:$A,$F4),$B:$B),2,0)),0,VLOOKUP(1,CHOOSE({1,2},--EXACT($A:$A,$F4),$B:$B),2,0))
Can somebody help me transform this into a formula that google sheet will accept? Thanks!
Solution that works on GoogleSheets:
=ArrayFormula(IF(ISERROR(VLOOKUP(1,({--EXACT($A:$A,$F4),$B:$B}),2,0)),0,VLOOKUP(1,({--EXACT($A:$A,$F4),$B:$B}),2,0)))
The curly brackets with the comma between the parameters is combine the data ranges horizontally.
I got this fixed by using the formula:
=IF(ISERROR(LOOKUP(1,1/EXACT($A:$A,$F4),$B:$B)),0,LOOKUP(1,1/EXACT($A:$A,$F4),$B:$B))
Related
The data that i have is in a 2D fashion
I want the output in this type of schema using a Single Formula!
I've tried PIVOT and SUMIF,SUMIFS,QUERY functions. But, Alas unable to figure out the same. Can anyone please help me with this
You can use SUMPRODUCT for this task.
Formula B12 dragged right and down:
=SUMPRODUCT($B$5:$I$8*($A$5:$A$8=$A12)*($B$3:$I$3=B$11))
Result:
Pay attention at all those $ when adapting to your ranges.
you can also try this single formula to create the summary table.
=LAMBDA(x,y,{{"",y};x,MAKEARRAY(COUNTA(x),COUNTA(y),LAMBDA(r,c,SUM(FILTER(FILTER(B3:I,B1:I1=INDEX(y,,c)),A3:A=INDEX(x,r)))))})(FILTER(A3:A,A3:A<>""),UNIQUE(FILTER(B1:I1,B1:I1<>""),1))
I'm currently upgrading my sheets for an MTB program. I'm changing all my formulas to arrayformula so as to avoid anyone being left out when I forgot to drag the formula.
All that's left is the formula in cell J3.
Here's the link to the spreadsheet.
The formula is to count each plate numbers and if it matches with F2, return its latest time.
Any help is much appreciated.
can you try:
=BYROW(C3:C,LAMBDA(cx,IF(cx="",,IF(COUNTIF(G:G,cx)=F2,IFNA(VLOOKUP(cx,SORT(G:H,2,),2,)),"DNF"))))
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.
So I have these formulas here
=if(J3="","",sum(J3,M3:N3))
=if(A1="","",index('SHEET1?'!F:F,match(A1,'SHEET1?'!E:E,0)))
I have been trying to find a way to get this as an array but I can't seem to find the solution that works best with this specific format. The problem is that if I do the array formula as is, it shows the sum of the whole range instead of giving the sum per row.
Any help is appreciated. Thank you!
SUM is not supported by ARRAYFORMULA, use + or MMULT
=ARRAYFORMULA(if(J3:J="",,J3:J+M3:M+N3:N)))
Alternative:
=ARRAYFORMULA(if(J3:J="",,J3:J+MMULT(N(M3:N),N(TRANSPOSE(COLUMN(M3:N)^0)))))
INDEX is not fully supported by ARRAYFORMULA, use VLOOKUP
=ARRAYFORMULA(IF(A1:A="",,VLOOKUP(A1:A,E:F,2,FALSE)))
I'm trying to use arrayformula to expand the formula below but it's not working. When I copy-paste manually the formula into each cell it works.
=arrayformula(INDEX($1:$100,ROW(B2:B),match(YEAR(M$1:$1),$1:$1,0)))
What I want to achieve is to convert yearly salaries into monthly salaries based on years.
The spreadsheet can be viewed here:
https://docs.google.com/spreadsheets/d/1veiYh1CMIfFPwBGQk4OwKmCLa7q08TugReVfAXtpIgI/edit#gid=1363287956
Thanks!
Solution:
Since you are looking for a specific column, you can use HLOOKUP as a substitute for INDEX and MATCH:
=ARRAYFORMULA(HLOOKUP(YEAR(M1:AT1),A1:H11,ROW(B2:B11))/12)
This should yield the same result as the previous formula: