I’m having difficulties with this function/array.
{=IF(ROWS(A9:A$9)<=A$1,INDEX(Tracker!C:C,SMALL(IF(Tracker!$C$3:$C$9965=A$2,Tracker!$R$3:$R$9965=A$3,ROW(Tracker!$C$3:$C$9965)),ROWS(A9:A$9))),"")}
(and yes, I made it an array with the ‘shift + Ctrl + Enter’ )
Basically, I need to add another condition to this. I’ve tried several different methods, but none seem to like my syntax. What it’s doing is searching for one condition in a specific column then I need to add another condition to in another row before it displays the indicated cell.
What you see above is a function that does work, but with only one condition. All I need to do is make it have another condition before it does what it does now. That's all. Any help? Idea's? Even a presentation on how it put together and why. I love learning so give it to me! :)
Try this:
{=IF(AND(ROWS(A9:A$9)<=A$1,"Second Condition"),INDEX(Tracker!C:C,SMALL(IF(Tracker!$C$3:$C$9965=A$2,Tracker!$R$3:$R$9965=A$3,ROW(Tracker!$C$3:$C$9965)),ROWS(A9:A$9))),"")}
Different formatting for viewing:
{=IF(
AND(
ROWS(A9:A$9)<=A$1,
"Second Condition"
),
INDEX(
Tracker!C:C,
SMALL(
IF(
Tracker!$C$3:$C$9965=A$2,
Tracker!$R$3:$R$9965=A$3,
ROW(Tracker!$C$3:$C$9965)
),
ROWS(A9:A$9)
)
),
"")}
Related
Hello Help Community,
I am trying to find a way to alternate queries from drop down menus. The idea is to be able to move between a list of queries and not have to rewrite the query when I want to use it again. I saw this done by writing the select statement in a drop down and referencing the cell containing the select statement in the query like this:
=QUERY(range, "" """"""&cell&"""""" "")
However, I cannot get this method to work. I can manipulate the same query using cell references and drop down menus but I would like to do more if it is possible.
Any idea how this could be achieved would be appreciated.
Regards, Andrew H"
example:
=QUERY(A2:D5, "where A = '"&B8&"'", 1)
if dropdown contains numbers use:
=QUERY(A2:D5, "where A = "&B8, 1)
Example Sheet I'm trying to get an exact match with an array in the criteria section of dget. Maybe there is another way to work around this, but I'm trying to give it a dynamic component in the array.
=dget('Micro Data'!$A$1:J,"PCR Score",{"Micro Type","Stage Type","Tank","ID#";"PCR PAL","Bright",F2,H2})
Sometimes all criteria matches multiple data points except the "Tank". However the tanks won't exactly match. Ex. All the data is the same in two data sets, except the tanks are CT1 and CT18. This then comes up with the #NUM! error. I'm trying to find if there is a way to get an exact match in the array data while still allowing it to reference the cell?
I know there is the option of making it "=XXX" making it a txt string, but this would take away the dynamic function. I would also loose the auto updating aspect when more data is added.
Thanks
Ryan, see my solution using a query, in Retain Log-GK, cell F2. I think it is just as dynamic as the dget, but perhaps not. It will need some error wrapping to avoid errors if no result found.
Formula is basically:
=query('Criteria Source'!A2:J5,
"select J where B = '"&D9&"' and C = '"&D10&"' and E = '"&D11&"' and D ='"& D2 & "' ",0)
I made all of the criteria dynamic, though obviously you can do it whatever way suits you best...
Let me know of any questions. I'll check back later...
Can this (Google Sheet) =IFS syntax be improved?
=IFS(and(E42>E38;E42>E34;E42>E30;E42>E26;E42>E22;E42>E18); "Cattleman";
and(E38>E42;E38>E34;E38>E30;E38>E26;E38>E22;E38>E18); "Naturalist";
and(E34>E42;E34>E38;E34>E30;E34>E26;E34>E22;E34>E18); "Farmer";
and(E30>E42;E30>E38;E30>E34;E30>E26;E30>E22;E30>E18); "Carpenter";
and(E26>E42;E26>E38;E26>E30;E26>E34;E26>E22;E26>E18); "Blacksmith";
and(E22>E42;E22>E38;E22>E30;E22>E34;E22>E26;E22>E18); "Miner";
and(E18>E42;E18>E38;E18>E30;E18>E34;E18>E22;E18>E26); "Builder")
And how can I add a default value so that if this syntax returns FALSE it doesn't say #N/A! in the cell, but "No class" or something similar instead (or empty)?
One obvious way would be to replace the ANDs with a MAX. Why? In the first line, if E42 is greater than all of the other cells, it must be greater than the MAX of them. So the condition in this line
E42 > MAX(E38; E34; E30; E26; E22; E18)
which looks much cleaner. Repeat for the other lines.
Trying to simplify it more, the logic of the formula seems to be that depending on which of the cells is the greatest, you choose a particular literal value. There is a function for that! I'd try this (can't test it though without access to your data)
=CHOOSE(
MATCH(
MAX(E42; E38; E34; E30; E26; E22; E18);
{E42; E38; E34; E30; E26; E22; E18});
"Cattleman"; "Naturalist"; "Farmer"; "Carpenter"; "Blacksmith"; "Miner"; "Builder")
wrap it in IFERROR like this:
=IFERROR(IFS(
AND(E42>E38;E42>E34;E42>E30;E42>E26;E42>E22;E42>E18);"Cattleman";
AND(E38>E42;E38>E34;E38>E30;E38>E26;E38>E22;E38>E18);"Naturalist";
AND(E34>E42;E34>E38;E34>E30;E34>E26;E34>E22;E34>E18);"Farmer";
AND(E30>E42;E30>E38;E30>E34;E30>E26;E30>E22;E30>E18);"Carpenter";
AND(E26>E42;E26>E38;E26>E30;E26>E34;E26>E22;E26>E18);"Blacksmith";
AND(E22>E42;E22>E38;E22>E30;E22>E34;E22>E26;E22>E18);"Miner";
AND(E18>E42;E18>E38;E18>E30;E18>E34;E18>E22;E18>E26);"Builder");
"No class")
Let’s say I have a list of URLs like this:
https://moz.com/
https://moz.com/about
https://moz.com/about/contact
https://moz.com/about/jobs
https://moz.com/beginners-guide-to-seo
https://moz.com/blog
https://moz.com/blog/category/advanced-seo
https://moz.com/blog/advanced-seo/technical
https://moz.com/blog/advanced-seo/content
https://moz.com/blog/googles-walled-garden
https://moz.com/blog/local-search-ranking-factors-survey-results-2017
https://moz.com/explorer
https://moz.com/help
https://moz.com/help/guides
https://moz.com/help/guides/moz-pro-overview
And I wanted it to be displayd in different columns according to the depth of the structure. Like each part of the URL is a level in the sites hierarchy and I want to visualize the hierarchy as such:
https://moz.com/
https://moz.com/about
https://moz.com/about/contact
https://moz.com/about/jobs
https://moz.com/beginners-guide-to-seo
https://moz.com/blog
https://moz.com/blog/advanced-seo
https://moz.com/blog/advanced-seo/technical
https://moz.com/blog/advanced-seo/content
https://moz.com/blog/googles-walled-garden
https://moz.com/blog/local-search-ranking-factors-survey-results-2017
https://moz.com/explorer
https://moz.com/help
https://moz.com/help/guides
https://moz.com/help/guides/moz-pro-overview
How can I do this? I have already tried utilizing the split function for this but that does not work because it just splits the different parts of the URL into different columns and not the whole URL into the accordant column.
Thanks in advance :)
Suppose the range with links is A:A:
Put the formula =ArrayFormula(COUNTIF(REGEXMATCH(A2,$A$1:A1), true))*1 in B2 and drag it down
Put the formula =REPT(" ",B1)&A1 in C1 and drag it down.
Edit1
Here's the single formula to do the same:
=ARRAYFORMULA(rept(" ",MMULT(
--(REGEXMATCH(A1:A15,TRANSPOSE(OFFSET(A1:A15,1,)))),SIGN(A1:A15<>""))-1)&A1:A15)
Edit2
this is a brilliant solution thank you alot. However it seems I run
into problems with sites that include .html at the very end
(moz.com/about.html but moz.com/about/contact.html and so on). Any
ideas how to bypass that?
=ARRAYFORMULA(rept(" ",MMULT(--(REGEXMATCH(A1:A15,REGEXREPLACE(TRANSPOSE(OFFSET(A1:A15,1,)),"\.html$",""))),
SIGN(A1:A15<>""))-1)&A1:A15)
Notes:
the formula also replaces ".html" from the end of a string.
I want to create a TFS query to show all the Work Items of type "Issue" & "Requirement" created by person "A" & "B".
I have the below query but it doesn't give me the expected results:
Can someone please tell me what changes I need to make?
Change the Created By clauses to "Or" and grouping them together. That should give you your expected results. Like this:
Found the answer here
https://msdn.microsoft.com/en-us/library/ms181360(v=vs.90).aspx
Thank you !
Adding details as suggested in the comments by #ios82
The main thing I had to do was to use the "grouped clauses" as described in the link above.
You do that by selecting the parameters you want to group by, right clicking and selecting the option of "Group Clauses". Screenshot below.
In my case I grouped both the "work item type" clauses together & the "created by". clauses together.
Also, the Condition on the CreatedBy (B) Should be changed to "OR" instead of "AND". That did it !!