I'm looking for a way to transform a string like 'TRSP_INV_CD' to 'TrspInvCd' in excel.
I will be very grateful if anyone can give me a solution to this issue. Thanks very much.
Try below formula
=SUBSTITUTE(PROPER(SUBSTITUTE(A1,"_"," "))," ","")
Use PROPER to capitalise, and SUBSTITUTE to remove the _'s
=SUBSTITUTE(PROPER(A1),"_","")
There are 2 ways towards the solution of this problem :
Using the replace function (built-in)
Using substitute formula
Example: =SUBSTITUTE(ORIGINAL_STRING,"OLD_CHARACTER","NEW_CHARACTER")
In this case =SUBSTITUTE(TRSP_INV_CD,"_","")
For more information on this consider visiting this here
Related
I am trying to convert a field in an excel sheet (e.g. REC_LEN) to camel case. I am using this formula to do that
=LEFT(A1) & RIGHT(SUBSTITUTE(PROPER(A1),"_",""), LEN( SUBSTITUTE(A1,"_",""))-1)
This is giving me results like RecLen. I want to convert my first letter to lowercase too (The expected output is recLen). Can somebody help me out with this? I am not too familiar with excel formulae. Not sure if this has been already asked before but any help is much appreciated.
Try this:
=LOWER(LEFT(A1)) & MID(SUBSTITUTE(PROPER(A1),"_",""),2,LEN(A1))
With Office 365 we can use:
=LET(
rr,A1,
x,TEXTSPLIT(rr,"_"),
CONCAT(LOWER(TAKE(x,,1)),PROPER(DROP(x,,1))))
Just use =PROPER(A1) on the another cell and you have it done.
=LOWER(LEFT(A1)) & MID(A1,2,LEN(A1))
This works perfectly for creating camel case when there is no space or underscore between words.
So HelloWorld will become helloWorld.
You were so close! Just wrap your left expression in a LOWER:
=LOWER(LEFT(A1)) & RIGHT(SUBSTITUTE(PROPER(A1),"_",""), LEN( SUBSTITUTE(A1,"_",""))-1)
using replace,
=LOWER(LEFT(A1,FIND("_",A1)-1))&PROPER(REPLACE(A1,1,FIND("_",A1),""))
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)))
This is a very basic question, sure the answer will be straightforward but cannot see any solution on the web so far...
Basically, I got this type of formula:
=IF(E314="AV",...,...)
If this statement is true, I want the result to be written between double quotes i.e. "-"
in the cell.
I have tried this:
=IF(E314="AV",""-"","")
But it does not work out. How should I be doing it?
Many thanks in advance! Cheers!
One option would be to concatenate with explicit " characters
=CONCATENATE(CHAR(34),"hello",CHAR(34))
So in your case...
=IF(e314="AV",CONCATENATE(CHAR(34),"-",CHAR(34)),"")
EDIT: Another solution
=IF(e314="AV","""-""","")
Could you help me with this: I need formula, which will get this result:
3/7+3
4/6+2
5/1+5
12/14+10
I know this:
=SUMPRODUCT(--LEFT(A1:A3,FIND("/",A1:A3)-1))&"/"&SUMPRODUCT(--REPLACE(A1:A3,1,FIND("/",A1:A3),0)
I don't know how to add another parameter with "+".
Please try:
=SUMPRODUCT(--LEFT(A1:A3,FIND("/",A1:A3)-1))&"/"&SUMPRODUCT(--MID(A1:A3,FIND("/",A1:A3)+1,FIND("+",A1:A3)-FIND("/",A1:A3)-1))&"+"&SUMPRODUCT(--MID(A1:A3,FIND("+",A1:A3)+1,1))
Ended with a big formula.
=CONCATENATE(SUMPRODUCT(--LEFT(A1:A3,SEARCH("/",A1:A3,1)-1)),"/",SUMPRODUCT(--MID(A1:A3,SEARCH("/",A1:A3,1)+1,SEARCH("+",A1:A3,SEARCH("/",A1:A3,1)+1)-SEARCH("/",A1:A3,1)-1)),"+",SUMPRODUCT(--RIGHT(A1:A3,LEN(A1:A3)-SEARCH("+",A1:A3,SEARCH("/",A1:A3,1)+1))))
I need help in combining two IF condition statements in excel. Both are working fine, just that when I try to combine them then I'm getting error. Below are the conditions:
=IF(AND(F19="No", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52)))),"Section Complete","Section Incomplete")
=IF(AND(F19="Yes", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52),ISBLANK(D43),ISBLANK(D44),ISBLANK(D45),ISBLANK(D46),ISBLANK(D47),ISBLANK(D48),))),"Section Complete","Section Incomplete")
Please help me in combining them.
Thanks in advance, Krishna
... I didn't try and make it prettier / more efficient - I just used your original formulas, but this should do what you want:
=IF(OR(AND(F19="No", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52)))),AND(F19="Yes", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52),ISBLANK(D43),ISBLANK(D44),ISBLANK(D45),ISBLANK(D46),ISBLANK(D47),ISBLANK(D48))))),"Section Complete","Section Incomplete")
Hope this does the trick!!
You could just as simple replace the "Section incomplete" in the first No-IF, by replacing it with the Yes-IF.
=IF(AND(F19="No";NOT(OR(ISBLANK(B36);ISBLANK(B37);ISBLANK(D36);ISBLANK(D37);ISBLANK(B40);ISBLANK(D39);ISBLANK(F39);ISBLANK(D40);ISBLANK(F40);ISBLANK(B43);ISBLANK(B44);ISBLANK(B48);ISBLANK(B49);ISBLANK(B50);ISBLANK(B51);ISBLANK(B52))));"Section Complete";IF(AND(F19="Yes";NOT(OR(ISBLANK(B36);ISBLANK(B37);ISBLANK(D36);ISBLANK(D37);ISBLANK(B40);ISBLANK(D39);ISBLANK(F39);ISBLANK(D40);ISBLANK(F40);ISBLANK(B43);ISBLANK(B44);ISBLANK(B48);ISBLANK(B49);ISBLANK(B50);ISBLANK(B51);ISBLANK(B52);ISBLANK(D43);ISBLANK(D44);ISBLANK(D45);ISBLANK(D46);ISBLANK(D47);ISBLANK(D48);)));"Section Complete";"Section Incomplete"))
Try simplifying with some COUNTA functions like this:
=IF(AND(COUNTA(B36,B37,D36,D37,B40,D39,F39,D40,F40,B43,B44,B48:B52)=16,OR(F19="No",AND(F19="Yes",COUNTA(D43:D48)=6))),"Section Complete","Section Incomplete")
That should combine the two formulas without repetition