English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am wanting to do a formula for the following:
If M10>="100000" and O10>=".1" OR IF M>="100000" and O10<="-.1" OR IF M<="-100000" and O10>=".1" OR IF M<="-100000" AND O10>=".1" then "Yes" otherwise "No".

I have tried to write it but keep getting #Value. I am testing variances and this will tell me if I have a variance or not - any help would be appreciated! :)

2007-03-07 02:33:37 · 5 answers · asked by kewltazdude 3 in Computers & Internet Programming & Design

5 answers

Here's the proper syntax. I tested it and it does work.

=IF(OR(AND(M10>=100000, O10>=0.1), AND(M10>=100000, O10<=-0.1), AND(M10<=-100000, O10>=0.1), AND(M10<=-100000, O10>=0.1)), "YES", "NO")

Please note above formula has embedded spaces so that it will display properly in Yahoo. Excel should ignore them but if not, just paste into Notepad and replace spaces with nulls.

Anyway, I corrected the synax by using notepad. I find using notepad to be very helpful when working out logic of very long formulas.

Hope this helps.
Kind Regards,
QwertyKPH @ Yahoo !

2007-03-07 08:43:27 · answer #1 · answered by qwertykph 4 · 1 0

Try using user defined functions. It will be clearer to understand.

function findvariance(cellbig, cellsmall)
dim bigno
dim smallno
bigno = 10000
smallno = .1
findvariance = false
if cellbig >= bigno and cellsmall >=smallno then
findvariance = true
endif
if cellbig >= bigno and cellsmall <=smallno then
findvariance = true
endif
if cellbig <= -bigno and cellsmall <=smallno then
findvariance = true
endif
if cellbig <= -bigno and cellsmall >=smallno then
findvariance = true
endif
end function

2007-03-07 21:50:04 · answer #2 · answered by unnga 6 · 0 0

change all your "or" in your functions to Else and that should get you on your way, this is QUITE a long nested if function

2007-03-07 10:39:33 · answer #3 · answered by phoenix_61_98 3 · 0 1

remove the quotes on your numeric compares?

2007-03-07 10:42:21 · answer #4 · answered by WhydoIdothis 3 · 0 2

maybe add some brackets to clarify?

2007-03-07 10:42:03 · answer #5 · answered by Always Hopeful 6 · 0 2

fedest.com, questions and answers