How do I output a formula's result inside double quotes? - excel

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","""-""","")

Related

How can I transform the string in excel

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

Extract Parameter from URL Excel

does anybody has an excel formula for me which just gives me back the clickid parameter? Unfortunately this parameter is not always at the same position so I can't fix it with character count. It should always be between &clickid= and &
https://app.appsflyer.com/id770725904?pid=website_adwords&c=C_DEU_billig&tl_rf=https%3A%2F%2Fwww.google.com%2F&tl_nw=g&tl_mt=e&clickid=EAIaIQobChMIj5zchvqs4AIVQamaCh06NQlOEAAYASACEgJhRPD_BwE&af_keywords=billig+telefonieren+nach+iran&af_c_id=1597316081&af_adset_id=60710335432&af_ad_type=1t1&af_adset=Iran&af_ad_id=303032652682
Well for sure a regular expression will be able to find this, but a rather simple formula could do the trick aswell. For example:
=MID(A1,FIND("clickid=",A1)+8,FIND("&",A1,FIND("clickid=",A1)+8)-(FIND("clickid=",A1)+8))
This will work but someone may have a tidier option ...
=LEFT(SUBSTITUTE(MID(A1,FIND("clickid",A1),1000),"clickid=", ""),FIND("&",SUBSTITUTE(MID(A1,FIND("clickid",A1),1000),"clickid=", ""))-1)
Throw your URL into cell A1 and test it out.

Finding question marks in cell string

I would like to find out if a string within a cell in Excel 2010 contains any of the following, and then return a '1'.
?dementia
? dementia
dementia?
dementia ?
I've tried some formulas but they don't seem able to get past the use of the wildcard and the string when combined.
Would anyone have any pointers or advice?
Here is a combination of the suggested answers, and my own work around:
This is the formula you need:
=IF(IFERROR(FIND(A2,$C$3),0)>0,1,0)
where A2 is the string that you are trying to check.
Assuming you don't want to include word ? word and return 1, you can use something like this:
=IF(OR(LEFT(A1,1)="?",RIGHT(A1,1)="?"),1,"")
You will want to use the FIND function (Documentation).
Make sure your search term in in quotation marks.
If you are still having trouble with wildcards, you can try the CHAR function (Documentation). It will return the character as a string. In your case, to get a ?, you would use CHAR(63). I use this chart to keep track of CHAR codes (just use the number and ignore the "Alt")
REVISED:
If I understand the question correctly, you are trying to search long string in a short string list.
The formula you can use is:
=ISTEXT(LOOKUP(99^99,SEARCH(SUBSTITUTE($A$2:$A$5,"?","|"),SUBSTITUTE(C2,"?","|")),$A$2:$A$5))*1
The problem with my prior formula is due to that ? mark because it is being treated as a wild card. Here I have replace it with | (you can change this to a character that you will never use but avoid ? and *). This should work for you now.

Excel IF statement from drop down menu

I am trying to create an IF statement from a drop down menu where I have made the options Yes or No.
I have gone for: =IF(B2=''Yes'',D5,0). This is giving me an error.
However when I try: =IF(B2=Yes,D5,0) it says I have used the wrong data type. Can anyone help?
Thank you
Since this was cross-posted on SuperUser, I'm posting as an answer to "close out" this question:
It seems (based on the formula posted) that you have enclosed Yes in two single quotes (''Yes'') rather than double quotes ("Yes"). Excel uses double quotes for matching text strings, so change your formula to =IF(B2="Yes", D5, 0).

Combining two IF condition in excel for a cell

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

Resources