Google Sheets search and select from Database - arrays

i'm trying to make a advanced search but i'm stuck at all. I tried it with =SVERWEIS and also with INDEX but failed.
I hope the doc explains enough what I wanna try to do but failed at all. My knowlege isn't that bad but here I need help. Would be nice if someone could help me with this.
https://docs.google.com/spreadsheets/d/1BGFzntBg-YHcRHM0qChFg9yoLahoOTUehoV3_9DY9PU/edit?usp=sharing
This is the doc and can be edited.
Thanks for your time reading my bad english post. :)
https://prnt.sc/t7c85l

use:
=ARRAYFORMULA(VLOOKUP(A3:A; D:H; MATCH(B2; D2:H2; 0); 0))
spreadsheet demo

You can write formula as given below -
=if($B$2=E2;E5;0) + if($B$2=F2;F5;0) +if($B$2=G2;G5;0)+if($B$2=H2;H5;0).
Copy this formula in B5 cell in your sheet and try to change the filter from B2 cell.
You can extend this formula for 400 fields.

Related

How can I auto fill a formula with dynamic value in array in the same cell?

so I have a formula inside an array that looks like this
={CRYPTOFINANCE("kraken:"&ARL8&"/USD", "price_history", "10d")}
I want to auto fill the array with the same function but with the 'ARL8' reference in an ascending order, just like auto filling cells, but keep it all in one cell it should look like this...
={CRYPTOFINANCE("kraken:"&ARL8&"/USD", "price_history", "10d") ; CRYPTOFINANCE("kraken:"&ARL9&"/USD", "price_history", "10d") ; CRYPTOFINANCE("kraken:"&ARL10&"/USD", "price_history", "10d")} ,SUBSTITUTE(TRANSPOSE(SPLIT(REPT(12,1050),2)),1,"MISTAKE")) etc.
the thing is that I have about 1000 values from ARL8 reference to ARL1008 reference so it will take really long for me to write it all manually, so is there a way I can keep the rest of the function but have the ARL cell reference dynamically written while being able to specify the length of the array?
It's something I am struggling for a while now and still couldn't find a way so I really appreciate if you could explain the solution as well, and if there is more info I can give let me know, and thanks.
I tried a few things but they gave me different errors I didn't know how to solve and others just didn't work, I will just put it in case it helps
=ARRAYFORMULA(CRYPTOFINANCE("kraken:"&ARL8:ARL1008&"/USD", "price_history", "10d"))
the error it gave me is - "error Attribute price_history isn't supported in batch formulas"
try:
=BYROW(ARL8:ARL20, LAMBDA(x, CRYPTOFINANCE("kraken:"&x&"/USD", "price_history", "10d"))
update
you can generate a formula with a formula like:
={""; INDEX("=ARRAYFORMULA({SPLIT(""Exchange,Base,Quote,Time,Open,High,Low,Close,Quote Volume,Base Volume"", "","")"&
QUERY(";QUERY(TO_TEXT(CRYPTOFINANCE(""kraken:""&"&C2&
SEQUENCE(C3, 1, C4)&"&""/USD"",""price_history"",""10d"")), ""offset 1"", )",,9^9)&"})")}
demo sheet

Index or HLookup working "alone" but not working inside ArrayFormula

I'm trying to put the following formulas inside an ArrayFormula but the result is wrong (keep providing the first row result):
Working in each single cell
=INDEX($D$2:$AKA;match($A2:A;$A$2:A;false);MATCH(DATE(YEAR(TODAY());MONTH(TODAY());1);$D$1:$AKA$1;false))
Showing the same result in all cells
=arrayformula(IF(LEN($A$2:A);INDEX($D$2:$AKA;match($A2:A;$A$2:A;false);MATCH(DATE(YEAR(TODAY());MONTH(TODAY());1);$D$1:$AKA$1;false));))
Gsheet example
Thanks in advance,
Nick
use:
=INDEX(IFERROR(HLOOKUP(EOMONTH(TODAY(); -1)+1; D1:1000; IF(A2:A="";;ROW(A2:A)); 0)))
You may also try QUERY() approach.
=QUERY(INDEX(D2:5000;;MATCH(EOMONTH(TODAY();-1)+1;D1:1));"limit " & COUNTA(A2:A))

VLookup formula not working per the documentation

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)

Possible gSheets ArrayFormula display bug

I can almost always find an answer here for a problem, but not this time so I'm asking the community.
I'm having a problem with ArrayFormula not displaying the text in the True branch of an IF when the condition evaluates to True. Instead it displays the text associated with the False branch.
The array formulas are all on row 4. I thought it might be caused by one of them referencing row 5 instead of row 4 and showing the result from the next row but that isn't it.
I thought it might be a corrupted sheet but after recreating in a new sheet the problem was still present.
It is easier to show than to explain so I've provided the gsheet and a short screencast below. A link to the screencast is also in A1 in the gsheet.
https://docs.google.com/spreadsheets/d/1H7W__hM2L89faxIOZ23WgboXHgaWe0wYT20aWVr_vD8/edit?usp=sharing
https://www.loom.com/share/a867787fdc6044a3840125e288d4cb8c?from_recorder=1
Thanks much for taking a look...
AND formula is not supported under ARRAYFORMULA
use multiplication:
=ARRAYFORMULA(
IF(D4:D="",,
IF(D4:D<0, "No Profit",
IF(H4:H/(G4:G+1)*D4:D<D1,
IF((C4:C>C1)*(E4:E>(C1*3-1)), "Low Profit"&
TEXT(H4:H/(G4:G+1)*D4:D, "$00"), "Low Price"), H4:H/(G4:G+1)*D4:D))))
also note that anchoring $ in "true" AF is kinda pointless

Google Spreadsheet array not working

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..

Resources