Forum Discussion
Yehuda Ordower
Jun 28, 2019Copper Contributor
IF Statement for Multiple conditions
HI - Trying to write a statement that will do the following
If "Closed" then return 0
If "P" AND X < Y, then Y-X, otherwise 0
If "C" AND X>=Y, then X-Y, otherwise 0
Below is the statement I wrote and seems like it works if I have "Closed" or "C" but not "P"
=IF(AND(A1="Closed",0),IF(AND(H1="P",N1<O1),O1-N1,0),IF(AND(H1="C",N1>=Y1),N1-O1,0))
Any suggestions? Thanks
I don't believe there is any way to construct a URL that opens in the client app. I found this response from Microsoft:
Based on our test, we can set the way we open our files stored in SharePoint libraries. We can set it via activating the site collection setting "Open Documents in Client Applications by Default" and we can also change settings in library settings>Advanced Settings>Opening Documents in the Browser to Open in the client application.
Direct links to files will let the people have related permissions open files via Office online apps directly.
It is not feasible to change the way people open files by clicking the direct links. If you have any concern about that, I’d like to suggest you create a new UserVoice to improve our products better for you and others. Appreciate your understanding.
But if your users can access the library location directly, there are a couple of settings you need to confirm. You might need an administrator to do this.
The first setting is on the document library itself. If you go to Library Settings > Advanced Settings, there's an option to tell the library to open documents in the Client Application:
However, this usually does not do the trick in SharePoint Online, so make sure you/your admin also goes to the Site Collection Settings (OF THE PARENT SITE) and checks for "Open Documents in Client Application by Default":
Find that setting and make sure it is ACTIVE. To get to these settings, add /_layouts/15/ManageFeatures.aspx?Scope=Site to the end of your site URL. Like this:
https://your-site-here/_layouts/15/ManageFeatures.aspx?Scope=Site
I forgot to specify that this has to be set at the parent/top site level.
Also, you could possibly work around it by instructing people to choose Open > Open in app from the ellipsis menu on the document:
 
 
FYI: none of the settings seem to have any effect on PDFs. If there's a way to force PDFs (stored on SharePoint) to open in a client app rather than the browser, I can't find it! Local download appears to be the only option there.
Hope this helps!
4 Replies
Sort By
- Yehuda OrdowerCopper Contributor
Sergei - thank you for your super fast response and assistance with my Excel queries
- TwifooSilver ContributorTry this Boolean formula:
=(A1<>"Closed")*
(((H1="P")*(N1<O1)*(O1-N1))+
((H1="C")*(N1>=Y1)*(N1-O1))) - PeterBartholomew1Silver Contributor
Letting 'State' be ["Open"/"Closed"] and 'PC' be ["P","C"]
= (State="Open") * ( (PC="P")*(Y>X)*(Y-X) + (PC="C")*(X>Y)*(X-Y) )
which seems to reduce to
= (State="Open") * ( 1 - (PC="P") - (Y>X) ) * (X-Y)