Need help to have this formula ignore zero values as being the min value.
=IF(L4="",INDEX($D$3:$K$3,MATCH(MIN(D4:K4),D4:K4,0)),HLOOKUP(L4,$D$2:$K$3,2,FALSE))
As Scott points out replace:
MIN(D4:K4)
with:
MINIFS(D4:K4,D4:K4,"<>0")
(just insert this as a replacement)MINIFS() by itself, does not require array-entry.
Related
Please help, i'm looking to reference a portion of my file name in an excel cell, see below example:
File name: 000_XYZ_ABC_DEF ; I need to reference the ABC portion (but this won't be limited to only 3 letters as this varies) - is there a formula I could use that would cater for the variance as well as only referencing this portion?
thank you
In B1, formula copied down :
=TRIM(LEFT(RIGHT(SUBSTITUTE(A1,"_",REPT(" ",30)),60),30))
Well, very brutal with MID() and FIND() but works:
Basic explanation is that MID() takes the characters from a string from the start points and end point you define.
The use of find() is to locate the second underscore which is the start point (plus 1 though) and the position of the 3rd underscore which with the position of the second gives the number of characters to return.
It will be good practice to take it all apart.
Edit: I have added the complete function, so that you can copy it directly:
=MID(A1,FIND("_",A1,FIND("_",A1,1)+1)+1,FIND("_",A1,FIND("_",A1,FIND("_",A1,1)+1)+1)-FIND("_",A1,FIND("_",A1,1)+1)-1)
In your comment you have not included in your function the "_" which is the precise bits of the text FIND() is looking for. Compare mine to yours from your comment:
=MID(A1,FIND("",A1,FIND("",A1,1)+1)+1,FIND("",A1,FIND("",A1,FIND("",A1,1)+1)+1)-FIND("",A1,1)+1)-1
I need a function to look up organizational abbreviations in a text and return the first one thas shows up. I tried to solve that with a nested if clause but it has a logical error.
=IF(ISNUMBER(SEARCH("BZC";I5)); "Finanz"; IF(ISNUMBER(SEARCH("AZC" /1";I5));"IT";""))
It looks up BZC and AZC as desired and return the organization name. However, it does no return the first match in a string. Since BZC is the first lookup it will always be returned if it is in the string, eventhoug it might not be the first org abbreviation.
What functionality of excel can be used to solve this issue? I basically need an array of variables that a function should do a look up and return the first one that is found.
Edit:
I tried to implement the formula form Justyna MK. Besides the fact, that I still need to figure out the meaning of the formula (iferror, mid, small) It returns #N/A in my example. Is there a certain reason for that?
I hope I understood your request correctly. Here's an Array formula for you to try (enter using Ctrl + Shift + Enter):
=CHOOSE(MATCH(MID(A1,SMALL(IFERROR(SEARCH({"BZC","AZD","xxx"},A1),""),1),3),{"BZC","AZD","xxx"},0),"Finanz","IT","Other")
You'd probably need to change , to ; in order to match your regional settings.
You can easily expand the list of search items by modifying the contents of curly brackets { } and also by expanding the MATCH results at the very end of the formula.
Here's some sample result:
Edit: here's an adjusted solution that ignores the length of your code (the previous solution was assuming that the code is always 3-characters long). This time it's not an array formula so you can enter it as it is.
Also, I suspect that you should not change , to ; inside the curly brackets (it would modify the formula from column to row delimiter and thus it will stop working). The remaining , can be transformed to ;, if that makes sense.
=CHOOSE(MATCH(TRIM(LEFT(SUBSTITUTE(RIGHT(A1,LEN(A1)-SUMPRODUCT(SMALL(IFERROR(SEARCH({"BZC","AZD","XYZX/1","NP-HSD"},A1),""),1))+1)," ",REPT(" ",255)),255)),{"BZC","AZD","XYZX/1","NP-HSD"},0),"Finanz","IT","Other1","Other2")
The result:
I am using the following IF statement in Excel:
=IF(W41="Please Select",0,IF(W41="Plant Hire","XPH",IF(W41="Plant Sales","SPH",IF(W41="Crane Hire","XCH",IF(W41="Crane Sales","SCS",IF(W41="General X-Hire","GXH",IF(W41="Operations","XOP",IF(W41="Goods / Services","GSE",0))))))))
However it won't let me add any more IFs as it is telling me I have reached the maximum allowed. I need to add another six like so:
IF(W41="Plant","XPL",IF(W41="Whale","SWFM",IF(W41="Fire","FTH", etc
Please can someone show me what I would need to do to complete the formula?
This would be easier to do with a lookup table. List all the possible W41 values in column Y and all the corresponding codes in the same row in column Z then use this formula
=IFERROR(VLOOKUP(W41,Y:Z,2,0),0)
I have simple problem. I was analyzing some data and came up with this problem.
Below is my value in a colomn:
www.mysite.come/api/Customer?id=12333&name=jack
www.mysite.come/api/Department?id=52365&name=COP
www.mysite.come/api/Customer?id=13333&name=mathew
etc
I want to filter this data something like this
www.mysite.come/api/Customer
www.mysite.come/api/Department
www.mysite.come/api/Customer
Please help me with this.
If its just as simple as removing everything after, including, the ? then this will do it:
=LEFT(A:A,FIND("?", A1)-1)
Edit: If you want to catch the #VALUE! error when there is no ? simply use IFERROR:
=IFERROR(LEFT(A:A,FIND("?", A1)-1), A1)
Example rows:
www.mysite.come/api/Customer?id=12333&name=jack
www.mysite.come/api/Department?id=52365&name=COP
www.mysite.come/api/Customer?id=13333&name=mathew
Output:
www.mysite.come/api/Customer
www.mysite.come/api/Department
www.mysite.come/api/Customer
I think you need to use a combination of FIND and LEFT.
For example (where A1 contains your original value)
=LEFT(A1, FIND("?", A1) -1)
The significance of your mention of filter is not clear to me but you might copy your data into another column, select the latter column and with Find/Replace Find what:
~?*
Replace All.
Its a good idea to handle when when the column doesn't contain the "?". To do this use the ISERROR() function as follows:
=LEFT(A2, IF(ISERROR(FIND("?",A2))=TRUE,LEN(A2), (FIND("?",A2)-1)))
I have the below formula and it works will except, when I have a refund, I want it to then show a negative value. I tried adding additional criteria but when I try to save it says I have gone over my maximum.
=IF(ISNUMBER(SEARCH("$100 pen",$B1)),($F1*97),
IF(ISNUMBER(SEARCH("$250 pen",$B1)),($F1*242.5),
IF(ISNUMBER(SEARCH("$500 pen",$B1)),($F1*485),
IF(ISNUMBER(SEARCH("$1000 pen",$B1)),($F1*970),0))))
Is there any way I can put another IF statement around this so, when the $C1 (sell price) is negative (<0), then *-1?
You might append:
*IF(C1>0,1,-1)