Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Kay Kay is offline
external usenet poster
 
Posts: 33
Default If functions in table cells

I have read some of the post on calcualations in word tables and have dome
many over the years, but not as complicated as I have seen in the download
files. I have a word table that recieves its data as a bookmark from a form
in another section. If the bookmark returns 1 - Unsatisfactory, I want the
next column in the corresponding row to show 1 so that I can then total that
column and divide by the number of entries. I assumed...{if(B2="1 -
Unsatisfactory",1,"")}. I always get a syntax error. Inf act, I need to
nest five ifs. if(B2="1 - Unsatisfactory",1,if(B2="2 - Nees
Improvement",2,if(b2=3 - Meets Expcetations",3," ")}. etc...

Any help will be appreciated.
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default If functions in table cells

If you select the text in B2 and assign a Bookmark B2 to ti, then you can
use:

{ IF { REF B2 } = "1 - Unsatisfactory" 1 }

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kay" wrote in message
...
I have read some of the post on calcualations in word tables and have dome
many over the years, but not as complicated as I have seen in the download
files. I have a word table that recieves its data as a bookmark from a
form
in another section. If the bookmark returns 1 - Unsatisfactory, I want
the
next column in the corresponding row to show 1 so that I can then total
that
column and divide by the number of entries. I assumed...{if(B2="1 -
Unsatisfactory",1,"")}. I always get a syntax error. Inf act, I need to
nest five ifs. if(B2="1 - Unsatisfactory",1,if(B2="2 - Nees
Improvement",2,if(b2=3 - Meets Expcetations",3," ")}. etc...

Any help will be appreciated.



  #3   Report Post  
Posted to microsoft.public.word.tables
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default If functions in table cells

Hi Kay,

This can be ridiculously easy - if you get rid of that hyphen (perhaps replace it with a colon). Then all you need is {=B1}

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Kay" wrote in message ...
I have read some of the post on calcualations in word tables and have dome
many over the years, but not as complicated as I have seen in the download
files. I have a word table that recieves its data as a bookmark from a form
in another section. If the bookmark returns 1 - Unsatisfactory, I want the
next column in the corresponding row to show 1 so that I can then total that
column and divide by the number of entries. I assumed...{if(B2="1 -
Unsatisfactory",1,"")}. I always get a syntax error. Inf act, I need to
nest five ifs. if(B2="1 - Unsatisfactory",1,if(B2="2 - Nees
Improvement",2,if(b2=3 - Meets Expcetations",3," ")}. etc...

Any help will be appreciated.

  #4   Report Post  
Posted to microsoft.public.word.tables
Kay Kay is offline
external usenet poster
 
Posts: 33
Default If functions in table cells

Doug,

The content of the cell I need to reference in the formula is a reference
from a bookmark. That would be like a double reference, unless you mean to
reference the cell and not the contents. If so, can I nest five times and
what would the syntax look like. Do you have to provide all three arguments
for the "if"?

Thanks for your help!

"Kay" wrote:

I have read some of the post on calcualations in word tables and have dome
many over the years, but not as complicated as I have seen in the download
files. I have a word table that recieves its data as a bookmark from a form
in another section. If the bookmark returns 1 - Unsatisfactory, I want the
next column in the corresponding row to show 1 so that I can then total that
column and divide by the number of entries. I assumed...{if(B2="1 -
Unsatisfactory",1,"")}. I always get a syntax error. Inf act, I need to
nest five ifs. if(B2="1 - Unsatisfactory",1,if(B2="2 - Nees
Improvement",2,if(b2=3 - Meets Expcetations",3," ")}. etc...

Any help will be appreciated.

  #5   Report Post  
Posted to microsoft.public.word.tables
Kay Kay is offline
external usenet poster
 
Posts: 33
Default If functions in table cells

Are you suggesting that the "-" keeps the function from working. I tried
replacing it, but remember, I still need to nest five ifs..and maybe it is
just my syntax {if(B2= "1. Unsatisfactory" ,1,if(b2= "2. Needs
Improvement",2,"")

Thanks for your help!
"macropod" wrote:

Hi Kay,

This can be ridiculously easy - if you get rid of that hyphen (perhaps replace it with a colon). Then all you need is {=B1}

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Kay" wrote in message ...
I have read some of the post on calcualations in word tables and have dome
many over the years, but not as complicated as I have seen in the download
files. I have a word table that recieves its data as a bookmark from a form
in another section. If the bookmark returns 1 - Unsatisfactory, I want the
next column in the corresponding row to show 1 so that I can then total that
column and divide by the number of entries. I assumed...{if(B2="1 -
Unsatisfactory",1,"")}. I always get a syntax error. Inf act, I need to
nest five ifs. if(B2="1 - Unsatisfactory",1,if(B2="2 - Nees
Improvement",2,if(b2=3 - Meets Expcetations",3," ")}. etc...

Any help will be appreciated.




  #6   Report Post  
Posted to microsoft.public.word.tables
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default If functions in table cells

Hi Kay,

Simply removing the hyphen will allow the formula field to extract just the number, which is what I understand you're trying to use
the IF test for.

What happens when a formula field encounters text in a cell is that it ignores the text and tries to perform a calculation using any
numbers and mathematical operators it finds there. In this case, the hyphen is acting like a minus sign, but there's only one number
on the cell, so the formula field thinks you've got an invalid formula and returns a 0. If you had a second number in the cell, and
kept the hyphen, the formula field would subtract the second number from the first. If you've got two numbers an no mathematical
operator (ie + - / *) Word adds them together. Try pointing a formula field to a cell containing a date in dd/mm/yy format and you
get the day divided by the month divided by the year. Bizarre!

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Kay" wrote in message ...
Are you suggesting that the "-" keeps the function from working. I tried
replacing it, but remember, I still need to nest five ifs..and maybe it is
just my syntax {if(B2= "1. Unsatisfactory" ,1,if(b2= "2. Needs
Improvement",2,"")

Thanks for your help!
"macropod" wrote:

Hi Kay,

This can be ridiculously easy - if you get rid of that hyphen (perhaps replace it with a colon). Then all you need is {=B1}

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Kay" wrote in message ...
I have read some of the post on calcualations in word tables and have dome
many over the years, but not as complicated as I have seen in the download
files. I have a word table that recieves its data as a bookmark from a form
in another section. If the bookmark returns 1 - Unsatisfactory, I want the
next column in the corresponding row to show 1 so that I can then total that
column and divide by the number of entries. I assumed...{if(B2="1 -
Unsatisfactory",1,"")}. I always get a syntax error. Inf act, I need to
nest five ifs. if(B2="1 - Unsatisfactory",1,if(B2="2 - Nees
Improvement",2,if(b2=3 - Meets Expcetations",3," ")}. etc...

Any help will be appreciated.



  #7   Report Post  
Posted to microsoft.public.word.tables
Kay Kay is offline
external usenet poster
 
Posts: 33
Default If functions in table cells

You are so clever....thanks so much. It works perfectly!!!!!!

"macropod" wrote:

Hi Kay,

Simply removing the hyphen will allow the formula field to extract just the number, which is what I understand you're trying to use
the IF test for.

What happens when a formula field encounters text in a cell is that it ignores the text and tries to perform a calculation using any
numbers and mathematical operators it finds there. In this case, the hyphen is acting like a minus sign, but there's only one number
on the cell, so the formula field thinks you've got an invalid formula and returns a 0. If you had a second number in the cell, and
kept the hyphen, the formula field would subtract the second number from the first. If you've got two numbers an no mathematical
operator (ie + - / *) Word adds them together. Try pointing a formula field to a cell containing a date in dd/mm/yy format and you
get the day divided by the month divided by the year. Bizarre!

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Kay" wrote in message ...
Are you suggesting that the "-" keeps the function from working. I tried
replacing it, but remember, I still need to nest five ifs..and maybe it is
just my syntax {if(B2= "1. Unsatisfactory" ,1,if(b2= "2. Needs
Improvement",2,"")

Thanks for your help!
"macropod" wrote:

Hi Kay,

This can be ridiculously easy - if you get rid of that hyphen (perhaps replace it with a colon). Then all you need is {=B1}

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Kay" wrote in message ...
I have read some of the post on calcualations in word tables and have dome
many over the years, but not as complicated as I have seen in the download
files. I have a word table that recieves its data as a bookmark from a form
in another section. If the bookmark returns 1 - Unsatisfactory, I want the
next column in the corresponding row to show 1 so that I can then total that
column and divide by the number of entries. I assumed...{if(B2="1 -
Unsatisfactory",1,"")}. I always get a syntax error. Inf act, I need to
nest five ifs. if(B2="1 - Unsatisfactory",1,if(B2="2 - Nees
Improvement",2,if(b2=3 - Meets Expcetations",3," ")}. etc...

Any help will be appreciated.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resize Word table cells without moving/resizing the other cells? hoozieg Tables 2 October 4th 07 11:15 PM
Putting Table of Contents into Table Cells Josh Craig Tables 7 June 12th 07 03:21 AM
want cells in a table to copy data from cells in another table Conrad D. Farner Tables 2 September 27th 06 04:21 PM
Referencing cells in a table Candace Tables 1 June 23rd 05 06:52 PM
pb creating of the cells in a table neonico Tables 2 February 7th 05 12:29 AM


All times are GMT +1. The time now is 11:52 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"