[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

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,
Villeroy
Super User

Joined: 04 Oct 2004
Posts: 10081
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
karolus

Joined: 22 Jun 2011
Posts: 210

 Posted: Wed May 23, 2012 10:17 am    Post subject: Hi =VLOOKUP(B2;LookupScale) Karo
Villeroy
Super User

Joined: 04 Oct 2004
Posts: 10081
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
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.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum