If statement that inserts symbol

D

dee

I need to evaluate the value in column B and, based on the value, insert a
particualr symbol.

For example:

Column B Column C
55
=IF(B1<=20,CHAR(74),IF(B1<=30,CHAR(75),CHAR(76)))

This works in Excel, but not in Word. I need to do this in Word as am
merging with an Access database.

Any help would be greatly appreciated!
 
S

Stefan Blom

In Word, you can use the following field construct:

{ SYMBOL { IF B1 <= 20 "74" "{ IF B1 <= 30 "75" "76" }" } \f Wingdings }

(My example assumes that the font is Wingdings. If not, specify the
appropriate font after the \f switch.)

To insert each pair of field delimiters, { }, press Ctrl+F9. To update the
selected fields, press F9. To show/hide field codes, press Alt+F9.

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
D

dee

Thanks for your response. I tried this, but it didn't return anything.

I hit Ctrl F9 the number of times necessary to generate the curly brackets,
then typed the statements as you indicated. When I toggle field codes, do
F9, it just doesn't display anything.

When I toggle fields codes, it only shows one set of curly brackets and one
of the symbols.

I'm obviously missing something!

Thanks!
--
Thanks!

Dee


Stefan Blom said:
In Word, you can use the following field construct:

{ SYMBOL { IF B1 <= 20 "74" "{ IF B1 <= 30 "75" "76" }" } \f Wingdings }

(My example assumes that the font is Wingdings. If not, specify the
appropriate font after the \f switch.)

To insert each pair of field delimiters, { }, press Ctrl+F9. To update the
selected fields, press F9. To show/hide field codes, press Alt+F9.

--
Stefan Blom
Microsoft Word MVP


in message
 
S

Stefan Blom

Sorry, instead of B1 you must use { = B1 }, assuming that the whole field
construct is inside a table, and B1 is the cell address. If not, bookmark
the number, naming it "B1" (or something more descriptive, if you prefer),
then use { B1 } in the field code.

--
Stefan Blom
Microsoft Word MVP


in message
Thanks for your response. I tried this, but it didn't return anything.

I hit Ctrl F9 the number of times necessary to generate the curly
brackets,
then typed the statements as you indicated. When I toggle field codes, do
F9, it just doesn't display anything.

When I toggle fields codes, it only shows one set of curly brackets and
one
of the symbols.

I'm obviously missing something!

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top