| View previous topic :: View next topic |
| Author |
Message |
rliddle Newbie

Joined: 23 May 2012 Posts: 2
|
Posted: Wed May 23, 2012 9:32 am Post subject: Trouble with IF Statement |
|
|
I am trying to create an easy quote system. I have different prices based on quantity.
< 100 $1.10
100 - 300 .99
301 - 500 .89
500 up .79
I have been messing with the formula for a couple of days. This is the most recent.
It gives me FALSE
=IF(AND(B2<100;1.1);IF(AND(B2>=100<300;0.99);IF(AND(B2>=300<500;0.89);IF(B2>=500;0.79))))
Any help appreciated, |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Wed May 23, 2012 10:07 am Post subject: Re: Trouble with IF Statement |
|
|
=LOOKUP(B2;LookupScale)
With LookupScale being:
0 1.10
100 0.99
301 0.89
500 0.79 _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
karolus OOo Advocate

Joined: 22 Jun 2011 Posts: 209
|
Posted: Wed May 23, 2012 10:17 am Post subject: |
|
|
Hi
=VLOOKUP(B2;LookupScale)
Karo |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Wed May 23, 2012 10:30 am Post subject: |
|
|
| karolus wrote: | Hi
=VLOOKUP(B2;LookupScale)
Karo |
No. VLOOKUP takes 3 or 4 arguments.
=LOOKUP(B2;LookupScale)
OR
=LOOKUP(B2:column_1;column_2)
OR
=VLOOKUP(B2;LookupScale;2)
OR
=VLOOKUP(B2;LookupScale;2;1)
OR
=INDEX(column_2;MATCH(B2;column_1);1) _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
rliddle Newbie

Joined: 23 May 2012 Posts: 2
|
Posted: Wed May 23, 2012 2:39 pm Post subject: Thanks all! Worked like a charm. |
|
|
| Your help is VERY much appreciated. |
|
| Back to top |
|
 |
|