Formula assistance

50 views Asked by At

I am trying to create a formula and cant get it to work.

So -

IF x is >=1000 - 100 however IF x is <999 *80%

So the equation if I entered 1000 would equal 900, but if I entered 800 it would equal 640

I've tried -

=IF(L9>=1000,L9-100,L9)OR(L9<999,L980%,L9)

and

=IF(OR(L9>1000,L9<1000),L9-100,L9*80%)

But both neither give the results I need.

I know I'm missing something but not sure what?

Any takers on this one?

T

2

There are 2 answers

1
jepozdemir On

You can use the following:

=IF(L9>=1000, L9-100, L9*0.8)
0
Excellor On

For some clarity on what's going wrong: the OR function returns TRUE or FALSE, it will return TRUE if any of the statements is TRUE, and FALSE if none of them are.

On how the IF function works: It will check whether your first statement is TRUE or FALSE; so the first statement should be a logical expression;

On a TRUE it will return whatever you put in the second statement, the third statement is the value returned when your first statement is FALSE.

So to break down what @jepozdemir 's answer does: Check the value in cell L9 and see if it's higher than or equal to 1000; if so return the value of cell L9 minus 100; otherwise take 80% of it.


Another tip: when writing a function name, Excel will show you a description of what that function does, when you the type the first bracket it will show you what's what, and what is required (normal text is required, text surrounded by these brackets [] is optional).

Or use the F1 key to get the help page to show up. Hope it helps!