April 23, 2015
Hi everyone,
I am trying to write a formula to check for two text values, "NS" and "ND". So far all I have managed it to check for one value as per below. I am sure I should be using the OR function with IF to check for the second value but I cannot get the syntax right - could someone help me?
=IF(LEFT(H3,2)="NS","T40",H3)
Need the formula to check for both NS and ND and return T40 if true, return the value in H3 if false.
Many thanks!
Alan
October 5, 2010
Good job Alan, well done 🙂
For anyone else reading this, this article might help
April 23, 2015
Hi there,
I am back on the "OR" trail, looking for help again. I have the formula below that does not work, (wrong syntax at least):
=IF(OR(MAX(G15:XFD15)>3.5,MIN(G15:XFD15)<-3.5,"VISIT"))
I am trying to write the formula to look at the values from G15:XFD15 and determine if any entry is greater than 3.5 or less than -3.5, if it is then return the text "VISIT", can someone help me get this right?
Many thanks,
Alan
VIP
Trusted Members
June 25, 2016
April 23, 2015
Many thanks Sunny, it works perfectly of course! 🙂
So a very simple mistake from me in terms of the syntax, any advice on how best to solve that type of issue when writing formulas? I still seem to be using the trial and error approach which obviously doesn't work that well!
Cheers,
Alan
VIP
Trusted Members
June 25, 2016
Hi Alan
I suggest you split each formula into different cells first.
This will allow you to check each formula to see if it is returning the correct value and also help check for any syntax error.
Once you have determine that they are OK you can then combine the formulas together to create one mega formula.
Hope that makes sense. This is what I did to come up with the above formula.
Cheers
Sunny
April 23, 2015
Hi Sunny,
Many thanks for the insight. I should be able to work this out but just to check for the example formula above would you split into the following individual formula's in individual cells:
MAX statement
MIN statement
IF statement
then combine?
I like the concept of the approach, just looking to double check I am interpreting it correctly.
Cheers,
Alan
VIP
Trusted Members
June 25, 2016
April 23, 2015
Hi Sunny,
Excellent! Many thanks for the advice and for catching the importance of validating the "OR" statement before the "IF" which I missed.
I will start employing this approach going forward, I guess we will see the success or otherwise by the number of posts I submit!
Cheers,
Alan
1 Guest(s)