## Using IF THEN statements in = formula ??

### Using IF THEN statements in = formula ??

Hi

I have a table that i am trying to build some logic into the problem i run
into is this

___E20_______F20__________H20____
/ list price / base discount / Net price /
----------------------------------------------

in the net price cell i use the equasion =e20*(1-f20/100)
which works fine but IF i do not have a base discount THEN i do not want the
list price to move into the net price box becuase that number is used else
where and if no discount i do not want it used.

The best i can figure it needs to be something like
IF f20 <>0 THEN =e20*(1-f20/100) ELSE end
but that does not work. Dont even know if it is possible to do in the field
on the document or if i need to write something up in VB to do this. But if
i write it in VB how do i refer to the cells of a table?

Any help would be greatly appreciated.

### Using IF THEN statements in = formula ??

Bonjour,

Dans son message, < cory > rivait :

|| Hi
||
|| I have a table that i am trying to build some logic into the problem i
run
|| into is this
||
|| ___E20_______F20__________H20____
|| / list price / base discount / Net price /
|| ----------------------------------------------
||
|| in the net price cell i use the equasion =e20*(1-f20/100)
|| which works fine but IF i do not have a base discount THEN i do not want
the
|| list price to move into the net price box becuase that number is used
else
|| where and if no discount i do not want it used.
||
|| The best i can figure it needs to be something like
|| IF f20 <>0 THEN =e20*(1-f20/100) ELSE end
|| but that does not work. Dont even know if it is possible to do in the
field
|| on the document or if i need to write something up in VB to do this. But
if
|| i write it in VB how do i refer to the cells of a table?
||

Try this:

(Use CTRL-F9 to insert the curly braces)

{IF F20 <> 0 "{=E20*(1-F20/100)}" " F20"}

The spaces are important in:
IF F20 <> 0 "

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
XXXX@XXXXX.COM
Word MVP site: http://www.yqcomputer.com/

### Using IF THEN statements in = formula ??

Bonjour,

Dans son message, < cory > rivait :

||
||| Bonjour,
|||
||| Dans son message, < cory > rivait :

|||
||||| Hi
|||||
||||| I have a table that i am trying to build some logic into the problem i
||| run
||||| into is this
|||||
||||| ___E20_______F20__________H20____
||||| / list price / base discount / Net price /
||||| ----------------------------------------------
|||||
||||| in the net price cell i use the equasion =e20*(1-f20/100)
||||| which works fine but IF i do not have a base discount THEN i do not
want
||| the
||||| list price to move into the net price box becuase that number is used
||| else
||||| where and if no discount i do not want it used.
|||||
||||| The best i can figure it needs to be something like
||||| IF f20 <>0 THEN =e20*(1-f20/100) ELSE end
||||| but that does not work. Dont even know if it is possible to do in the
||| field
||||| on the document or if i need to write something up in VB to do this.
But
||| if
||||| i write it in VB how do i refer to the cells of a table?
|||||
|||
||| Try this:
|||
||| (Use CTRL-F9 to insert the curly braces)
|||
||| {IF F20 <> 0 "{=E20*(1-F20/100)}" " F20"}
|||
||| The spaces are important in:
||| IF F20 <> 0 "
|||
||| --
||| Salut!
||| _______________________________________
||| Jean-Guy Marcil - Word MVP
||| XXXX@XXXXX.COM
||| Word MVP site: http://www.yqcomputer.com/
|||
|||
||| That did not do the trick it still makes list = net with that even if
there is no value in F20

Sorry, I thought that if there was no discount, then the net price would be
equal to the list price, and would be repeated in the net columnh (which is
the normal way of doing things in such tables). OTOH, I do not have all the
details, so, in your case, because you do not want the net price to show up
if there is no applicable discount, change
"F20"
to
""
at the end of the formula.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
XXXX@XXXXX.COM
Word MVP site: http://www.yqcomputer.com/

### Using IF THEN statements in = formula ??

Other suggestions still welcome as well.

### Using IF THEN statements in = formula ??

Bonjour,

Dans son message, < cory > rivait :

|||
||| Still not working properly. It is as if word does not understand what
F20 refers to. Is it
||| possible i can e-mail you this thing and you can take a look at it?
That may be the best
||| aproach at this moment.
||

Try this then:

{IF {=F20} <> 0 "{=E20*(1-F20/100)}" ""}

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
XXXX@XXXXX.COM
Word MVP site: http://www.yqcomputer.com/