I am coming here tonight because I do not understand something about Google Sheets.
I found a super GSheet file that can do Gantt planning. So I tried to transpose that into a personal document. Before starting to make some more custom formulas I just tried to copy and paste the formula used for the reference graph ("hatched" graph) and I already have a formula analysis error.
I really do not understand where the problem comes from.
Here is the original formula, functional:
And now the same formula in my doc, but that does not work
try:
=SPARKLINE({SPLIT(REPT("7,";FLOOR((INT(G5)-INT(F5))/7));",")\MOD(INT(G5)-INT(F5);7)};
{"charttype"\"bar";"color1"\"white";"color2"\"lightgrey"})
Related
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.
I have the following formula in cell D2 in a Google Spreadsheet:
=IF(ISBLANK(B2),"",B2-C2)
How do I apply that formula to the whole column D with ArrayFormula? Because ArrayFormula is the best solution, right?
Thanks
Enclose the formula in the google sheets Arrayformula() function. Then change the reference from B2 to B2:B500 (or leave blank for open ended reference). Same for the second reference.
So =ARRAYFORMULA(IF(B2:B="","",B2:B-C2:C)) should work. Note that I changed ISBLANK to X="" since the arrayformula is bound to find values in the entire array so it won't return blank.
--
Whether this is the best way I don't know. The benefit is that this grows with the dataset and avoids errors when you haven't filled the formula far enough down. However it can sometimes slow sheets down (I've heard but not experienced anything severe myself). If you're experiencing slow sheets I recommend Ben Collin's blog on the topic.
Whithout closed ended references
=mmult( arrayformula(1*(ROW(A2:A)<TRANSPOSE(ROW(A2:A)+1))*(ROW(A2:A)>=TRANSPOSE(ROW(A2:A))) -1*(ROW(A2:A)>TRANSPOSE(ROW(A2:A)))*(ROW(A2:A)<=TRANSPOSE(ROW(A2:A)+1)) ) , A2:A)
I have a database and I need to create a sumifs expression in Google sheets with the following rules: I have a range of cells and this would be a filter for what the sumifs must sum (similar to an OR). I think the image will explain a little bit better what my expected result is:
I have been trying with a lot of examples but none of them have given me the right result.
You can filter the values and then sum up:
First one would be: =SUM(FILTER($B$1:$B$6;$A$1:$A$6=$F$4:$F$6))
Second one: =SUM(FILTER($B$1:$B$6;$A$1:$A$6=$I$4:$I$5))
You can see an example I uploaded to GDrive
I have a very old excel template which works fine on all latest office versions. Now I am trying to convert this excel template to Google Spreadsheet. I have completed almost 90% of the conversion except some formulas which are shoing parse error in Google Spreadsheet.
Excel Template is using a formula like =IF(B182="","",VLOOKUP(B182,[1]!PRICE_AREA,2,FALSE)). In this formula, I am not able to understand the range given in VLOOKUP formula.
Could someone help me to interpret this range notation which is [1]!PRICE_AREA
Thanks in advance
I realized that the template has references to some other excel spreadsheet. When try to convert using Google Converter, it automatically stripped the path to the other excel file and put [1] text. Now I am using IMPORTRANGE formula in Google Spreadsheet to import the range value from other spreadsheet and it works fine.
Make Google Spreadsheet Formula Repeat Infinitely helped me to expand my formula indefinitely and other StackExchange results helped me get to here:
=ARRAYFORMULA(IF((AF2:AF="")," ","L"&ROW(F2:F)&":AD"&ROW(F2:F)))
However, when I tell "L"&ROW(F2:F)&":AD"&ROW(F2:F) to CONCATENATE, every row gives a results as if it was CONCATENATE(L2:AD2).
I tried =ARRAYFORMULA(IF((AF2:AF="")," ",CONCATENATE("L"&ROW(F2:F)&":AD"&ROW(F2:F)))) and =ARRAYFORMULA(IF((AF2:AF="")," ",CONCATENATE(INDIRECT("L"&ROW(F2:F)&":AD"&ROW(F2:F))))) but neither are working.
I am trying to get each row to CONCATENATE(L2:AD2) then CONCATENATE(L3:AD3) then L4:AD4 and so on.
Any help is most appreciated.
To make more easy to explain and understand by using an example, assume that the source values are in the range A2:C3
Instead of using
ARRAYFORMULA(CONCATENATE(A2:C3))
use
ARRAYFORMULA({A2:A3&B2:B3&C2:C3})