Dropdown List Values

  • Thread starter got questions via OfficeKB.com
  • Start date
G

got questions via OfficeKB.com

In a "protected" Word2000 form template using Tables:
I have a drop down list in a Cell containing only 5 items: 1, 2, 3, 4 and 5

When someone clicks on the dropdown and selects one of the numbers, I want to
place a numeric value represented by the number in the dropdown in another
column. This value will ultimately be totaled in a column at the bottom of
the form. This is replicated 25 times on the form, so would like to use cell
references in the formula.

Example: IFB1=1,0.00,0.00 IFB1=2,0.25,0.00 IF B1=3,0.50,0.00 IF B1=4,0.75,0.
00 IF B1=5,1.00,0.00
Basically: IF, THEN, ELSE - I understand the concept, just don't know where
quotes, brackets and commas should go so Word interprets it correctly.

Can this be written as a nested IF statement? I believe it falls under the 7
items rule. The cell reference in the formula would have to be changed for
each of the 25 instances in the table.

Help in constructing this so it works would be appreciated....

My thanks and Best regards
 
G

Greg

Well unless you change it, the bookmark of the first row dropdown will
be dropdown1. So the conditional would look something like this:

IF{Dropdown1} = 1 "0.00" {IF{Dropdown1} = 2 "0.25"{IF{Dropdown1} = 3
"0.50"{IF{ Dropdown1} = 4 "0.75"{IF{ Dropdown1} = 5 "1.00"""}}}}}

Which is basically an IF THEN ELSE nested 4 deep.
 
G

got questions via OfficeKB.com

My thanks Greg: This seems to work, one small detail: the following is
showing in the recriprocal cell:
IF3 = 1 "0.00" 0.50 ....and I only want the 0.50 to show.....
what do I need to add to drop off the "IF3=1 "0.00" "
 
G

Greg Maxey

Basically the IF works like this { IF "Something" = "1""Do This""Do That"}

Notice the three "" pairs on the right hand side. The first pair is the
condition. The example you are using since the condition is a numerical
value the "" can be omitted. The second pair defines the "Then" the third
pair the "Else" Again if either Then or Else is itself another field code
you can omit the "". If all you want is a "Then" then you can omit the
ELSE altogether and the field returns nothing.

Consider My name is: { IF {MergeField Name} = "Greg""Greg"}
I know that my name is Greg and I want the field to return Greg or nothing
at all. There is no ELSE element.
I could have written that :
{ IF {MergeField Name} = "Greg""Greg"""} where the else element is blan.

Your could write {IF F3 = 1 ".05"}




or some helpful tips using Word.
 
G

got questions via OfficeKB.com

Greg - thanks again....this is my last attempt and I promise I'll go away.
I'm so frustrated, I could grind railroad ties with my back teeth!

Code is firing properly! Yea! When I click 1, I get 0.00 in cell A. And it
DOES change when I click on the other numbers in the dropdown. Yea! Problem
remains...the code itself, [IF B1=1 “0.00” 0.00] is also showing in cell A..
... all I want to see in this cell is the result 0.00, or 0.25, or 0.50, etc -
no code, no brackets, no quotes! It does not disappear when I toggle the
field codes, Alt-F9, nor does it disappear when I protect the form or print
it.....

I generally don't have much problem resolving formula issues in Word, but
this is the first time where I have to get into multiple issues. Word gives
you several ways and places to create formulas, thru Insert-Fields and
Equations, under Table-Formula as well as the form fields themselves, under
Type: Calculation. I can also construct formulas directly using VBA. Maybe
I can't see the forest for the vba trees....sorry for the diatribe, its late,
I've spent way too much time trying to get this to work and you also probably
have better things to do..

My thanks for your persistence in following the thread......

Greg said:
Basically the IF works like this { IF "Something" = "1""Do This""Do That"}

Notice the three "" pairs on the right hand side. The first pair is the
condition. The example you are using since the condition is a numerical
value the "" can be omitted. The second pair defines the "Then" the third
pair the "Else" Again if either Then or Else is itself another field code
you can omit the "". If all you want is a "Then" then you can omit the
ELSE altogether and the field returns nothing.

Consider My name is: { IF {MergeField Name} = "Greg""Greg"}
I know that my name is Greg and I want the field to return Greg or nothing
at all. There is no ELSE element.
I could have written that :
{ IF {MergeField Name} = "Greg""Greg"""} where the else element is blan.

Your could write {IF F3 = 1 ".05"}

or some helpful tips using Word.
My thanks Greg: This seems to work, one small detail: the following
is showing in the recriprocal cell:
[quoted text clipped - 9 lines]
 
G

Greg Maxey

Tell you what. E-mail me the document (no macros). I will have a look and
send it back. You know my last name. I am in the Navy and we sometimes
pronounce single letters sphoenetically. You should be able figure out my
e-mail address.



--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
Greg - thanks again....this is my last attempt and I promise I'll go
away. I'm so frustrated, I could grind railroad ties with my back
teeth!

Code is firing properly! Yea! When I click 1, I get 0.00 in cell A.
And it DOES change when I click on the other numbers in the dropdown.
Yea! Problem remains...the code itself, [IF B1=1 “0.00” 0.00] is
also showing in cell A.. .. all I want to see in this cell is the
result 0.00, or 0.25, or 0.50, etc - no code, no brackets, no quotes!
It does not disappear when I toggle the field codes, Alt-F9, nor does
it disappear when I protect the form or print it.....

I generally don't have much problem resolving formula issues in Word,
but this is the first time where I have to get into multiple issues.
Word gives you several ways and places to create formulas, thru
Insert-Fields and Equations, under Table-Formula as well as the form
fields themselves, under Type: Calculation. I can also construct
formulas directly using VBA. Maybe I can't see the forest for the
vba trees....sorry for the diatribe, its late, I've spent way too
much time trying to get this to work and you also probably have
better things to do..

My thanks for your persistence in following the thread......

Greg said:
Basically the IF works like this { IF "Something" = "1""Do This""Do
That"}

Notice the three "" pairs on the right hand side. The first pair is
the condition. The example you are using since the condition is a
numerical value the "" can be omitted. The second pair defines the
"Then" the third pair the "Else" Again if either Then or Else is
itself another field code you can omit the "". If all you want is
a "Then" then you can omit the
ELSE altogether and the field returns nothing.

Consider My name is: { IF {MergeField Name} = "Greg""Greg"}
I know that my name is Greg and I want the field to return Greg or
nothing
at all. There is no ELSE element.
I could have written that :
{ IF {MergeField Name} = "Greg""Greg"""} where the else element is
blan.

Your could write {IF F3 = 1 ".05"}

or some helpful tips using Word.
My thanks Greg: This seems to work, one small detail: the
following
is showing in the recriprocal cell:
[quoted text clipped - 9 lines]
Which is basically an IF THEN ELSE nested 4 deep.
 
G

Greg Maxey

Well Mate, I offerred. I don't know how much longer I will be able to
follow this thread. I am packing now for a trip and will be out for a bit.

When you unprotect your form and toggle the field code what shows in Cell A?

Are you seeing this [IF B1=1 “0.00” 0.00] business and the field code?

What happens when you toggle off field codes?

Are you seeing this [IF B1=1 “0.00” 0.00] and the desired display (e.g.,
0.50")?

If so then just delete the [IF B1=1 “0.00” 0.00] business.

Without your document or a better explanation of your indications I am
afraid I can't help out much more.

Good luck. I will be around another hour or two. Send the document if you
can.
--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
Greg - thanks again....this is my last attempt and I promise I'll go
away. I'm so frustrated, I could grind railroad ties with my back
teeth!

Code is firing properly! Yea! When I click 1, I get 0.00 in cell A.
And it DOES change when I click on the other numbers in the dropdown.
Yea! Problem remains...the code itself, [IF B1=1 “0.00” 0.00] is
also showing in cell A.. .. all I want to see in this cell is the
result 0.00, or 0.25, or 0.50, etc - no code, no brackets, no quotes!
It does not disappear when I toggle the field codes, Alt-F9, nor does
it disappear when I protect the form or print it.....

I generally don't have much problem resolving formula issues in Word,
but this is the first time where I have to get into multiple issues.
Word gives you several ways and places to create formulas, thru
Insert-Fields and Equations, under Table-Formula as well as the form
fields themselves, under Type: Calculation. I can also construct
formulas directly using VBA. Maybe I can't see the forest for the
vba trees....sorry for the diatribe, its late, I've spent way too
much time trying to get this to work and you also probably have
better things to do..

My thanks for your persistence in following the thread......

Greg said:
Basically the IF works like this { IF "Something" = "1""Do This""Do
That"}

Notice the three "" pairs on the right hand side. The first pair is
the condition. The example you are using since the condition is a
numerical value the "" can be omitted. The second pair defines the
"Then" the third pair the "Else" Again if either Then or Else is
itself another field code you can omit the "". If all you want is
a "Then" then you can omit the
ELSE altogether and the field returns nothing.

Consider My name is: { IF {MergeField Name} = "Greg""Greg"}
I know that my name is Greg and I want the field to return Greg or
nothing
at all. There is no ELSE element.
I could have written that :
{ IF {MergeField Name} = "Greg""Greg"""} where the else element is
blan.

Your could write {IF F3 = 1 ".05"}

or some helpful tips using Word.
My thanks Greg: This seems to work, one small detail: the
following
is showing in the recriprocal cell:
[quoted text clipped - 9 lines]
Which is basically an IF THEN ELSE nested 4 deep.
 

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