We have 3 columns: Filename, Project and RA(which is a calculated column)
In RA we want the value Start Workflow if column Project doesn't contain -- or Project doesn't contain a space.
=OR(IF(ISERROR(FIND("--",[Filename])),
IF(ISERROR(FIND(" ",[project])), "Start Workflow", "No"
)
Try this out
=IF(OR(Filename="--",ISBLANK(Project)),"No","Start Workflow")
Example Logical Tests
Related
I have 2 Excel worksheets. In the first I have a table that has a column named "Sales Order" and "SO Item" of each row (product) plus some other columns. In this table I concatenate "Sales Order" and "SO Item" so that I have Sales Order parent (xxxxxxx00) and also Sales Order childs (xxxxxxx01, xxxxxxx02,...,xxxxxxx09). However, in the second worksheet I also have the "concatenation" column but only contains Sales Order parents. How can I pull the whole rows containing the childs of each parent from worksheet 1 to worksheet 2?
I've tried to do it using VLOOKUP but this only returns a single child value (xxxxxxx001) and also its not returning the whole row where this code is located
Table 1 is:
Sales Order
SO Item
Concatenation
Material Description
Feas Plan Date
2503319449
100
2503319449100
SYS-7210 SAS-Mxp
Bundle Header
2503319449
101
2503319449101
PS-7210 SAS-T/Mxp
1/31/2023
2503319449
102
2503319449102
SYS-7210 SAS-Mxp2VDC
Global Allocation
2503319449
200
2503319449200
OS-7210 SAS-Mxp
1/31/2023
Table 2 is:
Sales Order
SO Item
Concatenation
Material Description
Feas Plan Date
2503319449
100
2503319449100
SYS-7210 SAS-Mxp
Bundle Header
2503319449
200
2503319449200
OS-7210 SAS-Mxp
1/31/2023
I want Table 2 to extract the missing "Concatenation" items from Table 1.
It is not clear from the question, how to present the output. I assume Table2 is your lookup table. Based on the input data, you need to return the entire Table1, I assume your Table1 has more data in your real case, and you want to extract just the information based on the lookup table. In the way you construct the concatenation, for the lookup it is only necessary the SO Item column values. Put on G2 the following formula:
=LET(tbA, A3:E4, tbB, A9:E12, soA, 1*INDEX(tbA,,2), soB, 1*INDEX(tbB,,2),
DROP(REDUCE("", soA, LAMBDA(ac,x, LET(f,
FILTER(tbB, (soB >= x) * (soB < x+100),""), IF(#f="", ac, VSTACK(ac,f))))),1))
Here is the output:
The condition:
IF(#f="", ac, VSTACK(ac,f))
It is just to prevent empty result from the FILTER output (f), it is not really necessary if you want to include the parent (condition: soB >= x as it is in the formula), but if you want to exclude it (soB > x) then you need it. Check my answer to the question: how to transform a table in Excel from vertical to horizontal but with different length on how to use DROP/REDUCE/VSTACK pattern. I convert to numeric values (multiplying INDEX by 1) the value of SO Item column, in case the input data is in text format, otherwise it is not necesary.
I understand this is a tough way of wording the problem I have. Please try and help me.
I want to create a Column called Orders which contains cells based on corresponding item values.
So if I have columns: FlatNo, Truffle, Pineapple, Mango, Chocochips; I want to create a column called Orders which has value:
FlatNo - A51
Mango - 1
Chocochips - 1
(if no values in the Pineapple & Truffle Columns, none show up in Orders columns)
See image
How do I do that ? Thank you in advance
You can use IF and &. & simply puts the different desired things altogether.
Hope the following formula will get you the result for column orders. I have put the number of each item ordered inside parentheses before the item.
="Flat No. "&A2&IF(ISBLANK(B2),"","-("&B2&")"&$B$1)&IF(ISBLANK(C2),"","-("&C2&")"&$C$1)&IF(ISBLANK(D2),"","-("&D2&")"&$D$1)&IF(ISBLANK(E2),"","-("&E2&")"&$E$1)
For instance the third order is shown like this: Flat No. E-23-(1)Truffle -1 Pc Rs 60-(3)Mango -1 Pc Rs 60
Each row needs to be paired up with the one before it therefore I need a new column that looks like the following.
flag
1
1
2
2
3
3
4
4
5
5
.
.
.
and so on
You can solve this a number of ways with Alteryx. I chose to use one tool, the Multi-Row Formula tool, to make an elegant solution.
Add the Multi-Row Formula tool.
Use the default "Create a New Field" option and name the field "flag".
Choose 2 as the "Num Rows".
Choose "NULL" as the "Values for Rows that don't Exist".
For the expression, paste the following:
IF ISNULL([Row-1:flag])
THEN 1
ELSEIF [Row-1:flag] == [Row-2:flag]
THEN [Row-1:flag] + 1
ELSE [Row-1:flag]
ENDIF
This will create the flag for you by paring the first and second rows, third and fourth, and so on.
As a reference, see my page in the Alteryx community. I am a certified partner.
Alteryx Reference
This question relates to the Schematiq add-in for Microsoft Excel.
Using =tbl.Lookup(table, columnsToSearch, valuesToFind, resultColumn, [defaultValue]) the values in the valuesToFind column have a consistent 3 characters to the left and then varying characters after (e.g. 908-123456 or 908-321654 - i.e. 908 is always consistent)
How can I tell the function to lookup the value based on the first 3 characters only? The expected answer should be the sum of the results of the above, i.e. 500 + 300 = 800
tbl.Lookup() works by looking for an exact match - this helps ensure it's fast but in this case it means you need an extra step to calculate a column of lookup values, something like this:
A2: =tbl.CalculateColumn(A1, "code", "x => LEFT(x, 3)", "startOfCode")
This will give you a new column that you can use for the columnsToSearch argument, however tbl.Lookup() also looks for just one match - it doesn't know how to combine values together if there is more than one matching row in the table, so I think you also need one more step to group your table by the first 3 chars of the code, like this:
A3: =tbl.Group(A2, "startOfCode", "amount")
Because tbl.Group() adds values together by default, this will give you a table with a row for each distinct value of startOfCode and the subtotal of amount for each of those values. Finally, you can do the lookup exactly as you requested, which for your input table will return 800:
A4: =tbl.Lookup(A3, "startOfCode", "908", "amount")
My worksheets:
ELKK BSN Voornaam Achternaam DOB Basisschool Advies Voorrangschool Voorkeur
1 1 John Smit 1 Test VWO Test Test
2 2 Chris Kong 2 Test 2 HAVO Test Test
This worksheet is called Leerlingen
The second one:
School Advies Klasnaam Regulier
Test VWO VWO 1
Test 2 HAVO HAVO 1
Test 3 VWO SPORT 0
This worksheet is called VO-scholen
What I want to happen is, when I change the value "Advies" in the Leerlingen worksheet. I want to get all the schools from the VO-scholen Worksheet who also have that "Advies" and return them in the Leerlingen worksheet into a list under the column "Voorrangschool".
This means that with "John Smit" I can select the schools Test and Test 3, and with "Chris Kong" I can select the school Test 2.
Here is what I already tried:
=INDEX('VO-scholen'!A2:G4;MATCH(G2; 'VO-scholen'!$C$2:$C$4; 0);2 )
But it won't return multiple values, only the first value it can find.
my answer requires MOREFUNC addon*
Here I assume data in purchase "table" is in A9:C11. Adjust accordingly.
formula for Leerlingen!H2:
=MCONCAT(IF('VO-scholen'!$C$2:$C$4=G2,'VO-scholen'!$B$2:$B$4,""),",")
notice the curly braces. This is an array formula you have to confirm using Ctrl+Shift+Enter, not just Enter (so that curly braces appear)
then copy the formula down
MOREFUNC ADDON
Morefunc Addon is a free library of 66 new worksheet functions.
HERE is some information (by original author)
here is the last working download link I found
here is a good installation walk-through video
You'll want to modify this a little, but try:
=INDEX('VO-scholen'!$A$1:$G$4,MATCH($G2, 'VO-scholen'!$B$1:$B$4, 0),1 ) & IF(COUNTIF('VO-scholen'!$B:$B,Leerlingen!$G2)>1, ", " & INDEX(OFFSET('VO-scholen'!$A$1:$D$4,MATCH($G2,'VO-scholen'!$B$1:$B$4),0),MATCH($G2,'VO-scholen'!$B$1:$B$4),1),"")
The first index match grabs the first value in the table. The second index match grabs the first value in an offset from the first table. The offset starts the second lookup table down the number of rows from the first lookup value. In other words if you were searching in B1:B100 and the value was found in row 3, the second lookup will be in B4:B104.