I searched around on this site and found something similar to what I need, but I haven't been able to get it to work for me yet. I was able to get it to work when I do only half of it, but when I try to work in the other 2 conditions with AND statements, it gets messed up and I can't figure out what's going wrong.
The partial string of code that worked for me is this
=IF(M7>O7, IF(P7="R", 3, IF(P7="O", 2, IF)))
I have statements that would give different output...
If m7>o7 and p7="R" output a value of 3
If m7>o7 and p7="O" output a value of 2
If o7>m7 and p7="O" output a value of 1
If o7>m7 and p7="R" output a value of 0
Thanks in advance!
=IF(M7>O7,IF(P7="R",3,2),IF(P7="R",0,1))
Per the comment:
=IF(AND(M7<>"",O7<>"",P7<>""),IF(M7>O7,IF(P7="R",3,2),IF(P7="R",0,1)),"")
Related
--Edit - Solved by use of COUNTIFs --
So I am trying to see if something is possible with the below section.
I want to count how many rows are "Used&Finance" and how many are "New&Finance" etc. I cannot work out how I would do so... I hope you can help.
--edit added example data--
Does the below work for you?
I9: =COUNTIFS($H$2:$H$7,LEFT(H9,SEARCH(" ",H9)-1),$I$2:$I$7,MID(H9,SEARCH(" ",H9)+1,LEN(H9)))
I10: =COUNTIFS($H$2:$H$7,LEFT(H10,SEARCH(" ",H10)-1),$I$2:$I$7,MID(H10,SEARCH(" ",H10)+1,LEN(H10)))
I am using abenassi/Google-Search-API https://github.com/abenassi/Google-Search-API to make multiple Google queries in a small python script. I typically only need the first result (link) but the program is built to collect whole pages of results. So far I have been limiting the result as such:
results = google.search(query)
for result in iter(results[0:1]):
loc = result.link
The problem is that the script is slow as a result (I think) of having to wade through the whole page before I get my one link. Does anyone see something obvious I'm missing, or alternately, a simple way to modify the standard_search module https://github.com/abenassi/Google-Search-API/blob/master/google/modules/standard_search.py to limit results to first link only? Thanks!
I want to increase my snippet result. When I'm going to print . It display few data from the content along with "..." 3 dots. Please help me to increase the snippet result.
Thanks
I found an answer. In your search-result.tpl.php file.
Try to find the value of your body from result array and mentioned in under node_load function. For ex:- node_load($result['node']->entity_id)->body['und'][0]['value'];
This will fetch all the results. :)
Hi all I have been trying to fin out how to use AND and OR together on the same formula.
I'm trying to resolve the following issue :
The person will get a discount only if they are working on the Cerrovial project or if they are working on the Parinas project but the risk of the job must be Low
I tried to use a formula and excel gave me an error and also fixed my formula but I do not know if this is correct or what the "*" means
=IF(OR(D14="CerroVial",D14="Parinas")*AND(E14="Low"),"8%","")
You were close:
=IF(AND(OR(D14="CerroVial",D14="Parinas"),E14="Low"),"8%","")
All the elements of the AND need to be in the AND(...), just like for the OR, which you had done correctly.
I need my [[+idx]] tv to start at 0 instead of 1 so I tried this:
[[+idx:decr]] or [[+idx:substract=1]] but it gives me -1 (minus one).
Does anyone know another way to obtain 0?
Thank you
Using this in chunk for getImageList works (at least for me):
[[+idx:decr]]
It gives: 0,1,2,3 ....
P.S. using modx revo 2.3.1
set your template variable default to 0 when you create the variable.
What are you trying to do, your question is vague at best.
UPDATE
ok - what I think will work for you is to write a snippet to do the math... where ever you call the [[+idx]] instead write a snippet
[[!FixIDX? &itemindex=`[[+idx]]`]]
then in your FixIDX snippet just do the math with php and return the corrected index. Though perhaps a custom output modifier would be the better way to go: http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+(Output+Modifiers)
Though looking at the docs, your code should certainly work - I see no reason for it not to.